This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch 2/2] Fix decode_locdesc for gcc-4.7.x optimized DWARF
- From: Tom Tromey <tromey at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 27 Jul 2011 10:22:25 -0600
- Subject: Re: [patch 2/2] Fix decode_locdesc for gcc-4.7.x optimized DWARF
- References: <20110727153041.GB9736@host1.jankratochvil.net>
>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
Jan> There is decode_locdesc_read_mem workaround which is ugly, but it
Jan> was already there in a different form. The same may be needed for
Jan> DW_OP_GNU_push_tls_address but I haven't such a regression in the
Jan> testsuite, DW_OP_GNU_push_tls_address is more for
Jan> archer-jankratochvil-vla anyway.
I think this patch is definitely an improvement. decode_locdesc was
clearly a hack.
Jan> The right fix would be dynamic types with DWARF blocks for various type
Jan> fields.
Yeah. Ouch.
Jan> This change no longer supports bfd_get_sign_extend_vma / signed_addr_p for
Jan> DW_OP_addr. But neither does dwarf2expr.c so I guess it is not a concern.
I don't recall what happened here, but it doesn't matter -- if
dwarf2expr.c is wrong, now at least we can fix it in a single place.
Jan> + switch (ctx->location)
Jan> + {
Jan> + case DWARF_VALUE_REGISTER:
Jan> + case DWARF_VALUE_MEMORY:
Jan> + case DWARF_VALUE_STACK:
I don't understand why DWARF_VALUE_REGISTER is ok here, or why
DWARF_VALUE_LITERAL is not.
Tom