kgdb for ppc64 now available

Geoff Levand geoffrey.levand at am.sony.com
Wed Oct 19 11:01:12 EST 2005


Anton Blanchard wrote:
> Hi,
> 
>>For those interested, kgdb now supports ppc64 SMP.  On powermac only
>>an Ethernet connection is supported currently, but generic 8250 UART
>>PCI cards will be supported soon.
...
> 
> +       return kgdb_handle_exception(0, computeSignal(regs->trap), 0, regs);
> 
> We should use TRAP(regs) instead of regs->trap since the bottom bits may
> not be zero for an exception that only saves a partial register set.
> 

Anton,

I came back to do a little more work here.  I had a problem in that 
we have this in ptrace.h:

*
 * We use the least-significant bit of the trap field to indicate
 * whether we have saved the full set of registers, or only a
 * partial set.  A 1 there means the partial set.
 */
#define FULL_REGS(regs)		(((regs)->trap & 1) == 0)
#define TRAP(regs)		((regs)->trap & ~0xF)
#define CHECK_FULL_REGS(regs)	BUG_ON(regs->trap & 1)

But I see TRAP(regs) masks off four bits, not just the LSB.  This 
would seem to cause trouble with the 0x2002 trap that someone put 
into the kgdb trap table:

	{ 0x2002, 0x05 /* SIGTRAP */},		/* debug */

It seems this code was caried over from the ppc32 BookE code though.  Any 
idea what this is?  I would guess it's not a valid 64bit vector so it can be 
removed.

-Geoff





More information about the Linuxppc64-dev mailing list