Re: PATCH: Support x86 pseudo registers

H.J. Lu
2010-03-03T17:53:43Z

On Wed, Mar 3, 2010 at 9:33 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> 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.
>
>

It looks good to me.

Thanks.

--
H.J.