This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] Make DWARF-2 "address size" explicit
- From: "Jim Blandy" <jimb at red-bean dot com>
- To: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- Cc: "Jim Blandy" <jimb at codesourcery dot com>, gdb-patches at sourceware dot org
- Date: Mon, 28 Jan 2008 17:49:07 -0800
- Subject: Re: [rfc] Make DWARF-2 "address size" explicit
- References: <m34pehje1b.fsf@codesourcery.com> <200801141554.m0EFskPB011384@d12av02.megacenter.de.ibm.com>
On Jan 14, 2008 7:54 AM, Ulrich Weigand <uweigand@de.ibm.com> wrote:
> Apart from that, the behaviour should be identical, with one
> exception: what address size to use for CFI. Your patch uses
> size_of_encoded_value (DW_EH_PE_absptr)
> which basically boils down to:
> gdbarch_ptr_bit (current_gdbarch) / TARGET_CHAR_BIT
>
> This would be an effective change in behaviour to what we have
> now, which is:
> gdbarch_addr_bit (current_gdbarch) / TARGET_CHAR_BIT
>
> My patch uses in effect
> gdbarch_addr_bit (get_frame_arch (frame)) / TARGET_CHAR_BIT
> which does not change behaviour.
>
> However, it might well be that the original code is simply wrong
> and we *should* be using ...ptr_bit instead of ...addr_bit.
> What do you think?
(Sorry --- I thought I had replied to this.)
I don't think any change my patch made to the value used there was
intentional. Whatever you have determined is the best value to use
there is more likely to be right than whatever is in my patch. I
don't think this difference is a problem.