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" > 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