Skip to contentSkip to conversation

gdb regression in xen-3.0-testing.hg

DISCUSSION Simon Kagstrom 3 participants 7 messages Jun 22, 2006

lore
Share & tools
lore
#0 lore raw

Hello!

I recently updated to the latest xen-3.0-testing repository, and since then I've had problems with GDB debugging. Only single stepping ('step') works, not stepping over function calls ('next') and setting breakpoints doesn't work either.

I've looked in the changelog for changes in tools/libxc and tools/debugger/, but I haven't found any changes which would impact this (as far as I can see). I've tried to debug libxc a bit, and I can see the write of an 'int3' instruction, but it doesn't look like it actually happens.

Anyone else have this problem?

// Simon

#1 lore raw
Quoted 7 lines · In article <87irmth5jg.wl%[email protected]> you wrote:

Hello!

I recently updated to the latest xen-3.0-testing repository, and since then I've had problems with GDB debugging. Only single stepping ('step') works, not stepping over function calls ('next') and setting breakpoints doesn't work either.

Quoted 7 lines

I've looked in the changelog for changes in tools/libxc and tools/debugger/, but I haven't found any changes which would impact this (as far as I can see). I've tried to debug libxc a bit, and I can see the write of an 'int3' instruction, but it doesn't look like it actually happens.

Anyone else have this problem?

Hi,

I made a number of cleanups and fixes to xc_ptrace a while back which seem to have nade it into xen-3.0-testing. I'm not sure if the regression you are seeing is before or after those patches, but due to their fairly extensive nature you might want to look into them.

http://tx.downloads.xensource.com/xen-3.0-testing.hg?cs=8ed131452f27
http://tx.downloads.xensource.com/xen-3.0-testing.hg?cs=26eff2448966

Signature · 1 line
Horms                                           http://www.vergenet.net/~horms/
#2 lore raw

At Thu, 22 Jun 2006 19:14:19 +0900 (JST),

Quoted 8 lines · Horms
Quoted 7 lines

I've looked in the changelog for changes in tools/libxc and tools/debugger/, but I haven't found any changes which would impact this (as far as I can see). I've tried to debug libxc a bit, and I can see the write of an 'int3' instruction, but it doesn't look like it actually happens.

Anyone else have this problem?

Quoted 7 lines

I made a number of cleanups and fixes to xc_ptrace a while back which seem to have nade it into xen-3.0-testing. I'm not sure if the regression you are seeing is before or after those patches, but due to their fairly extensive nature you might want to look into them.

http://tx.downloads.xensource.com/xen-3.0-testing.hg?cs=8ed131452f27
http://tx.downloads.xensource.com/xen-3.0-testing.hg?cs=26eff2448966

No, I've used it after these changes (I remember stumbling onto a problem where the if (current_isfile) was reversed :-))

I'm looking into it now.

// Simon

#3 lore raw
In reply to Simon Kagstrom

At Thu, 22 Jun 2006 12:02:27 +0200,

Quoted 8 lines · Simon Kagstrom

Hello!

I recently updated to the latest xen-3.0-testing repository, and since then I've had problems with GDB debugging. Only single stepping ('step') works, not stepping over function calls ('next') and setting breakpoints doesn't work either.

Quoted 5 lines

I've looked in the changelog for changes in tools/libxc and tools/debugger/, but I haven't found any changes which would impact this (as far as I can see). I've tried to debug libxc a bit, and I can see the write of an 'int3' instruction, but it doesn't look like it actually happens.

I found the bug. I've used my patch to xc_ptrace.c to reenable debugging of paravirtualized guests in Changeset 93379554837c
(http://xenbits.xensource.com/xen-unstable.hg?cs=93379554837c), but forgot the patch to xen/arch/x86/domain.c (to export cr0 to the guest).

This caused cr0 to be zero when the guest context was read by xc_ptrace, and paging_enabled() therefore doesn't work.

Any chance of changesets 93379554837c, f226a5765c85, dcb66319ed1e being applied to xen-3.0-testing? Without these, paravirtualized debugging is still not possible in xen-3.0-testing.

// Simon

#4 lore raw
Quoted 4 lines · Simon Kagstrom

Any chance of changesets 93379554837c, f226a5765c85, dcb66319ed1e being applied to xen-3.0-testing? Without these, paravirtualized debugging is still not possible in xen-3.0-testing.

I can't find the last two changesets you refer to above.

-- Keir

#5 lore raw

At Thu, 22 Jun 2006 14:14:38 +0100,

Quoted 10 lines · Keir Fraser
Quoted 4 lines · Simon Kagstrom

Any chance of changesets 93379554837c, f226a5765c85, dcb66319ed1e being applied to xen-3.0-testing? Without these, paravirtualized debugging is still not possible in xen-3.0-testing.

I can't find the last two changesets you refer to above.

Sorry, must have cut and pasted the wrong numbers. The second one should not be needed, I think:

http://xenbits.xensource.com/xen-unstable.hg?cs=93379554837c
http://xenbits.xensource.com/xen-unstable.hg?cs=d056f91cfd95
http://xenbits.xensource.com/xen-unstable.hg?cs=ed696467fe64

// Simon

#6 lore raw
Quoted 6 lines · Simon Kagstrom

Sorry, must have cut and pasted the wrong numbers. The second one should not be needed, I think:

http://xenbits.xensource.com/xen-unstable.hg?cs=93379554837c
http://xenbits.xensource.com/xen-unstable.hg?cs=d056f91cfd95
http://xenbits.xensource.com/xen-unstable.hg?cs=ed696467fe64

The first of those doesn't even come close to automatically applying to the -testing tree. Unless someone manually backports this stuff it won't be going in.

-- Keir