RFC: Strip the ISA bit when printing symbol offsets
Eli Zaretskii
eliz@gnu.org
Sat Nov 14 09:28:00 GMT 2009
> Date: Fri, 13 Nov 2009 16:27:16 -0500
> From: Daniel Jacobowitz <drow@false.org>
>
> When you compile a function in ARM's Thumb mode, the low bit of the
> function's address is set to indicate the use of an alternate
> instruction set.
>
> This currently causes failures in two tests (mi-var-child.exp and
> member-ptr.exp), because we print $hex <function+1> instead of the
> expected $hex <function>.
>
> What do you think of this patch, which causes us to strip off the low
> bit when computing the offset if FUNCTION is a function symbol (rather
> than a data variable)?
Isn't it true that an address of a function should always be aligned,
so that its LSB is always zero? If so, I don't think we need to pass
the architecture pointer to build_address_symbolic, we could just
always reset the LSB. WDYT?
More information about the Gdb-patches
mailing list