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: PATCH: Support x86 pseudo registers


> Date: Tue, 2 Mar 2010 14:07:41 -0800
> From: "H.J. Lu" <hjl.tools@gmail.com>
> Cc: Eli Zaretskii <eliz@gnu.org>, gdb-patches@sourceware.org
> 
> >>> I presume it lets us say $ah or $ax in addition to $eax, and lets $eax
> >>> work on 64-bit systems where we really have $rax.
> >>
> >> Mmm hmm, and the context would be expressions or anywhere where a
> >> register name is appropriate (eg. info reg). ?Yes?
> >>
> >
> > Yes.
> >
> > (top-gdb) info reg $edi
> > edi ? ? ? ? ? ?0x1 ? ? ?1
> > (top-gdb) info reg $rdi
> > rdi ? ? ? ? ? ?0x1 ? ? ?1
> > (top-gdb) info reg $dl
> > dl ? ? ? ? ? ? 0xd8 ? ? -40
> > (top-gdb) info reg $dil
> > dil ? ? ? ? ? ?0x1 ? ? ?1
> > (top-gdb)
> >
> >
> 
> Basically, you can access any byte/word/dword registers, as shown
> in assembly code, the same way as word/dword registers.

Then how about this entry:

 * X86 general purpose registers

   GDB now supports reading/writing byte, word and double-word x86
   general purpose registers directly.  This means you can use, say,
   $ah or $ax to refer, respectively, to the byte register AH and
   16-bit word register AX that are actually portions of the 32-bit
   register EAX or 64-bit register RAX.


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