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: [rfa] frame address size incorrect if address size != ptr size


Corinna Vinschen wrote:

> I'm going to create a patch which defines and uses a new
> gdbarch_dwarf2_addr_size function.  It will be defined as a variable
> like this in gdbarch.sh:
> 
>   v:int:dwarf2_addr_size:::sizeof (void*):0:gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT:

Looks good, thanks.

> Given that, and also given that I will remove the redundant setting of
> cie->addr_size in decode_frame_entry_1, I have one question left.
> 
> What about that comment in decode_frame_entry_1?
> 
> If we only use either the V4 addr_size, or the gdbarch_dwarf2_addr_size
> function, then the comment really doesn't make much sense anymore in that
> spot.  I'm wondering if it should be moved to the gdbarch.sh file.  What
> do you think?

I agree.  In fact, the comment in gdbarch.sh could even be expanded to
say that gdbarch_dwarf2_addr_size needs to be defined if and only if the
platform GCC back-end defines a non-default DWARF2_ADDR_SIZE (and is only
necessary if Dwarf versions < 4 need to be supported).

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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