This is the mail archive of the
mailing list for the GDB project.
Re: RFC: Strip the ISA bit when printing symbol offsets
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 14 Nov 2009 11:26:42 +0200
- Subject: Re: RFC: Strip the ISA bit when printing symbol offsets
- References: <20091113212716.GA28795@caradoc.them.org>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Fri, 13 Nov 2009 16:27:16 -0500
> From: Daniel Jacobowitz <email@example.com>
> 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?