This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Fix %eflags register index on Solaris/amd64
- From: Pedro Alves <palves at redhat dot com>
- To: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 07 Feb 2012 19:35:52 +0000
- Subject: Re: Fix %eflags register index on Solaris/amd64
- References: <yddty32seuj.fsf@manam.CeBiTec.Uni-Bielefeld.DE>
On 02/07/2012 06:00 PM, Rainer Orth wrote:
> When I looked at %eflags in gdb, I found that
> it was always shown as 0/empty, which makes no sense. Digging around in
> gdb, I found the culprit: in both amd64-sol2-tdep.c
> (amd64_sol2_gregset_reg_offset) and i386-sol2-nat.c
> (amd64_sol2_gregset64_reg_offs, amd64_sol2_gregset32_reg_offs) the
> offset for %eflags was wrong: <sys/regset.h> has
>
> #define EFL 16
>
> for the 32-bit case, but
>
> #define REG_RFL 19
>
> for 64-bit, while 16 in 64-bit is
>
> #define REG_ERR 16
...
> The following patch fixes this and fixes all but one of the
> gcc.dg/simulate-thread tests. I still have to investigate that last
> one.
>
> Ok for mainline?
Looks obvious to me. Ok.
You may want to double check the other registers if you haven't yet.
--
Pedro Alves