kgdb support for gdb: patch 1
Amit S. Kale
amitkale@linsyssoft.com
Thu Oct 28 10:56:00 GMT 2004
Sorry about the compile error. I have done the changes you have suggested
below. Here is a new patch.
-Amit
On Thursday 21 Oct 2004 10:52 pm, Mark Kettenis wrote:
> From: "Amit S. Kale" <amitkale@linsyssoft.com>
> Date: Thu, 21 Oct 2004 18:21:08 +0530
>
> Hi,
>
> I haven't added any support for detecting kernel osabi
> automatically. Detecting it with present kernel binary structure
> is rather shaky. It's safer to let users run the command "set osabi
> Linux-kernel".
>
> Fair enough. Indeed it seems that vmlinux is a fairly standard static
> ELF executable.
>
> I'll be later sending more patches.
>
> Please review it and let me know if it's ok for inclusion in gdb.
>
> Of course it isn't, since this can't compile ;-). You seem to be in
> limbo betwen LINUXKERNEL and LINUX_KERNEL. Please choose the variant
> *with* the underscore.
>
> Anyway, I think for the kernel you shouldn't use the Linux register
> cache layout, bur rather the normal register layout. The Linux
> register cache includes the "orig_eax" pseudo register that is
> implemented by the kernel. My guess is that the kernel itself doesn't
> have it. I'm not completely sure though, but unless you can motivate
> why you do need "orig_eax" please remove these lines:
>
> + set_gdbarch_num_regs (gdbarch, I386_LINUX_NUM_REGS);
> + set_gdbarch_register_name (gdbarch, i386_linux_register_name);
> + set_gdbarch_register_reggroup_p (gdbarch,
> i386_linux_register_reggroup_p);
>
> These lines will need adjustments too:
>
> + tdep->gregset_reg_offset = i386_linux_gregset_reg_offset;
> + tdep->gregset_num_regs = ARRAY_SIZE (i386_linux_gregset_reg_offset);
> + tdep->sizeof_gregset = 17 * 4;
>
> Setting tdep->gregset_num_regs to I386_NUM_GREGS should be OK.
>
> Apart from that, you'll also need to provide a ChangeLog.
>
> Can you post an update patch?
>
> Cheers,
>
> Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lk.patch
Type: text/x-diff
Size: 2693 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb/attachments/20041028/a2750468/attachment.bin>
More information about the Gdb
mailing list