This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: PATCH: PR corefiles/11511: gcore doesn't work with orig_rax on Linux/amd64
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: hjl dot tools at gmail dot com
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 17 Apr 2010 18:25:38 +0200 (CEST)
- Subject: Re: PATCH: PR corefiles/11511: gcore doesn't work with orig_rax on Linux/amd64
- References: <20100417161115.GA25919@intel.com>
> Date: Sat, 17 Apr 2010 09:11:15 -0700
> From: "H.J. Lu" <hongjiu.lu@intel.com>
>
> This patch adds orig_rax support to amd64_linux_gregset_reg_offset.
> amd64 has both tdep->gregset_reg_offset/tdep->gregset_num_regs and
> amd64_native_gregset64_reg_offset/amd64_native_gregset64_num_regs. They
> are identical. There is no need to keep both. This patch also removes
> amd64_native_gregset64_reg_offset/amd64_native_gregset64_num_regs. OK
> to install?
No. I want to keep the -nat.c and -tdep.c code separate.
The bit below is ok, but please drop the other bits.
> * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Support
> orig_rax.
> diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c
> index 1205e31..f249d5d 100644
> --- a/gdb/amd64-linux-tdep.c
> +++ b/gdb/amd64-linux-tdep.c
> @@ -87,7 +87,14 @@ static int amd64_linux_gregset_reg_offset[] =
> 23 * 8, /* %ds */
> 24 * 8, /* %es */
> 25 * 8, /* %fs */
> - 26 * 8 /* %gs */
> + 26 * 8, /* %gs */
> + -1, -1, -1, -1, -1, -1, -1, -1,
> + -1, -1, -1, -1, -1, -1, -1, -1,
> + -1, -1, -1, -1, -1, -1, -1, -1,
> + -1, -1, -1, -1, -1, -1, -1, -1, -1,
> + -1, -1, -1, -1, -1, -1, -1, -1,
> + -1, -1, -1, -1, -1, -1, -1, -1,
> + 15 * 8 /* "orig_rax" */
> };
>
>