From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: amitkale@linsyssoft.com
Cc: gdb@sources.redhat.com
Subject: Re: kgdb support for gdb: patch 1
Date: Fri, 22 Oct 2004 12:28:00 -0000 [thread overview]
Message-ID: <200410211722.i9LHM4in000841@elgar.sibelius.xs4all.nl> (raw)
In-Reply-To: <200410211821.08680.amitkale@linsyssoft.com>
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 prev parent reply other threads:[~2004-10-21 17:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-21 17:22 Amit S. Kale
2004-10-22 12:28 ` Mark Kettenis [this message]
2004-10-28 10:56 ` Amit S. Kale
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200410211722.i9LHM4in000841@elgar.sibelius.xs4all.nl \
--to=mark.kettenis@xs4all.nl \
--cc=amitkale@linsyssoft.com \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox