This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: PATCH: Support x86 pseudo registers
On Tue, Mar 2, 2010 at 1:52 PM, Daniel Jacobowitz <dan@codesourcery.com> wrote:
> On Tue, Mar 02, 2010 at 11:47:35PM +0200, Eli Zaretskii wrote:
>> Who can help out here? ?I can help with wording, if someone tells the
>> story.
>
> Presumably H. J. knows why he wrote the patch?
>
> 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.
>
Exactly. I can do
(top-gdb) disass
Dump of assembler code for function main:
0x000000000044ce70 <+0>: sub $0x28,%rsp
0x000000000044ce74 <+4>: movq $0x0,(%rsp)
0x000000000044ce7c <+12>: mov %edi,(%rsp)
=> 0x000000000044ce7f <+15>: mov %rsp,%rdi
0x000000000044ce82 <+18>: movq $0x0,0x10(%rsp)
0x000000000044ce8b <+27>: mov %rsi,0x8(%rsp)
0x000000000044ce90 <+32>: movq $0x6a6ed0,0x18(%rsp)
0x000000000044ce99 <+41>: callq 0x44ceb0 <gdb_main>
0x000000000044ce9e <+46>: add $0x28,%rsp
0x000000000044cea2 <+50>: retq
End of assembler dump.
(top-gdb) p/x $edi
$1 = 0x1
(top-gdb) p/x $rdi
$2 = 0x1
(top-gdb)
--
H.J.