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/rfc] Recognize non-DW_AT_location <value optimized out> symbols


Hi Jan,

> * zero-length DW_AT_location should be the same as missing DW_AT_location.
>   https://fedorahosted.org/pipermail/elfutils-devel/2009-March/000180.html

I agree.

I have been trying to understand what is going on in this patch, so
can you bear with me?

The first observation is that dwarf2read treats zero-length DW_AT_location
lists as LOC_OPTIMIZED_OUT. See var_decode_location:

  /* A DW_AT_location attribute with no contents indicates that a
     variable has been optimized away.  */
  if (attr_form_is_block (attr) && DW_BLOCK (attr)->size == 0)
    {
      SYMBOL_CLASS (sym) = LOC_OPTIMIZED_OUT;
      return;
    }

I'll see if I can reproduce using the testcase you provided (I don't
have gcc-4.4 handy, so I can't use the C example you gave).

-- 
Joel


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