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: [patch 2/2] Fix decode_locdesc for gcc-4.7.x optimized DWARF


>>>>> "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


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