Re: PATCH: Support x86 pseudo registers

Michael Snyder
2010-03-12T18:22:27Z

H.J. Lu wrote:
> On Thu, Mar 11, 2010 at 8:23 PM, Pedro Alves <pedro@codesourcery.com> wrote:
>> On Wednesday 03 March 2010 17:33:21, Eli Zaretskii wrote:
>>> * 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.
>>>
>> I just realized that this change means that $sp is now just
>> a 16-bit word of $esp, instead of a pseudo-register resolving to
>> either $esp/$rsp (32-bit/64-bit). I can't say it is actually wrong to
>> have it that way, but, I think this should at least be mentioned in
>> NEWS, if not in the manual too, because it can catch people
>> by surprise.
>>
>
> I think we should treat sp as a special case here and not to make
> it 16bit.

I agree. I'm a user, and I'm very accustomed to typing "p $sp".
I wouldn't like its meaning to change.