This is the mail archive of the gdb@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: Symbol can't be found unless type 'tab'


On Mon, 10 Sep 2012 14:51:29 +0200, Yao Qi wrote:
>  <1><2c>: Abbrev Number: 3 (DW_TAG_variable)
>     <2d>   DW_AT_name        : i
>     <2f>   DW_AT_type        : <0x23>
>     <33>   DW_AT_location    : 0x0      (location list)

I guess because GDB does not like such complicated location expression for
glboal variables.

read_partial_die (const struct die_reader_specs *reader,
        case DW_AT_location:
          else if (attr_form_is_section_offset (&attr))
              dwarf2_complex_location_expr_complaint ();
+
add_partial_symbol (struct partial_die_info *pdi, struct dwarf2_cu *cu)
    case DW_TAG_variable:
      if (pdi->d.locdesc)
        addr = decode_locdesc (pdi->d.locdesc, cu);


There was a nice cleanup of it in:
	[patch 2/2] Fix decode_locdesc for gcc-4.7.x optimized DWARF
	http://sourceware.org/ml/gdb-patches/2011-07/msg00762.html
but I had to later revert it
	[commit] [patch#2] fetch result of locdesc expressions as integer (not address)
	http://sourceware.org/ml/gdb-patches/2011-10/msg00462.html
due to all the hacks on hacks in GDB needing to be cleaned up first.


Regards,
jan


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