This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix %eflags register index on Solaris/amd64


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]