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


On Fri, Mar 12, 2010 at 06:04:45PM +0200, Eli Zaretskii wrote:
> Maybe, but frankly I don't really understand what it says, exactly.
> Does it mean that if the name does clash with the architecture, the
> architecture's meaning is used?

I think that's what was intended.

> Anyway, are there any such conflicts in the current codebase?

Yeah, there are.  On some platforms, "$fp" is a GDB-computed value
based on the frame unwinder.  On others, it's a register that may or
may not have a frame pointer in it right now.  For instance, $fp on
ARM is r11; "fp" on M68K is between a5 and sp.  On i386 it's
calculated.  You'll get different results for this:

(gdb) p $fp
$1 = (void *) 0x7fffffffdec0
(gdb) p $fp --
Left operand of assignment is not an lvalue.

Whaddaya mean $fp isn't an lvalue?  Oh, it's an internal value, not an
alias for $rbp.

-- 
Daniel Jacobowitz
CodeSourcery


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