Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: Mark Kettenis <mark.kettenis@xs4all.nl>, gdb-patches@sourceware.org
Subject: Re: PATCH: PR corefiles/11511: gcore doesn't work with orig_rax on  	Linux/amd64
Date: Mon, 19 Apr 2010 17:28:00 -0000	[thread overview]
Message-ID: <4BCC9298.3010100@zytor.com> (raw)
In-Reply-To: <y2p6dc9ffc81004191021s6b2b56c1jd463a5270c417e13@mail.gmail.com>

On 04/19/2010 10:21 AM, H.J. Lu wrote:
> 
> I am CCing Peter, who is the Linux x86 kernel maintainer.
> 

Also adding Roland McGrath.

> We have 2 general-purpose register maps in GDB. One is in nat.c:
> 
> /* Mapping between the general-purpose registers in GNU/Linux x86-64
>    `struct user' format and GDB's register cache layout.  */
> 
> static int amd64_linux_gregset64_reg_offset[] =
> 
> It is used for reading/writing registers from/to kernel. One is in tdep.c:
> 
> /* Mapping between the general-purpose registers in `struct user'
>    format and GDB's register cache layout.  */
> 
> /* From <sys/reg.h>.  */
> static int amd64_linux_gregset_reg_offset[] =
> 
> It is use for reading/writing core dump.
> 
> Both are mappings between `struct user'  and  GDB's register cache.
> It is very unlikely that the current x86 Linux kernel ABI for accessing
>  `struct user' will change.  If the kernel ABI does need to change for
> whatever reason, the new interface will be introduced.
> 
> This applies to both i386 and x86-64 Linux kernel. I'd like to keep
> a single map between the general-purpose registers in `struct user'
> format and GDB's register cache for i386/x86-64 Linux. Will such
> a patch acceptable?
> 

struct user will not change, at least not for i386/x86-64.  New
additions will be done via regsets, i.e. PTRACE_GETREGSET.  I can't
speak for the embedded architectures, obviously, but they should do
something similar.

	-hpa


  reply	other threads:[~2010-04-19 17:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-17 16:11 H.J. Lu
2010-04-17 16:25 ` Mark Kettenis
2010-04-17 18:50   ` H.J. Lu
2010-04-18 21:33     ` Mark Kettenis
2010-04-19 15:26       ` Daniel Jacobowitz
2010-04-19 17:21       ` H.J. Lu
2010-04-19 17:28         ` H. Peter Anvin [this message]
2010-04-20 22:17           ` Roland McGrath

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=4BCC9298.3010100@zytor.com \
    --to=hpa@zytor.com \
    --cc=gdb-patches@sourceware.org \
    --cc=hjl.tools@gmail.com \
    --cc=mark.kettenis@xs4all.nl \
    /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