This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: implptrconst.exp error on 32-bit targets [Re: [3/4] fix DW_OP_GNU_implicit_pointer pointing to a constant]
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 13 May 2013 20:42:12 +0200
- Subject: Re: implptrconst.exp error on 32-bit targets [Re: [3/4] fix DW_OP_GNU_implicit_pointer pointing to a constant]
- References: <87vc7ukvl0 dot fsf at fleche dot redhat dot com> <87a9o7yk11 dot fsf at fleche dot redhat dot com> <20130512151434 dot GA7026 at host2 dot jankratochvil dot net> <87li7ibxf0 dot fsf at fleche dot redhat dot com>
On Mon, 13 May 2013 19:29:55 +0200, Tom Tromey wrote:
> Let me know what you think of this.
I find it correct.
As it uses DWARF-2 the DW_OP_GNU_implicit_pointer DIE offset has size like the
DWARF/inferior address size which you changed 8 -> 4 bytes now.
As was already discussed before using 32-bit addresses works even for 64-bit
archs except for - IIRC - Alpha, but that we just ignore.
This testcase in fact does not need any relocations, one could even keep there
the 64-bit address zize and rely on the fact that .debug_info in this testcase
will not contain any other CU and make the reference relative against label at
offset 0 of .debug_info (.Lcu1_begin). This will then work even with 64-bit
address sizes in 32-bit ELF file.
Thanks,
Jan