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: [RFA 2/4] dwarf2_physname


On Mon, Feb 01, 2010 at 11:32:08AM -0800, Keith Seitz wrote:
> On 02/01/2010 08:48 AM, Daniel Jacobowitz wrote:
> >>+    case DW_TAG_variable:
> >>+      {
> >>+	struct attribute *attr;
> >>+	attr = dwarf2_attr (die, DW_AT_specification, cu);
> >>+	if (attr)
> >>+	  return 1;
> >>+	attr = dwarf2_attr (die, DW_AT_external, cu);
> >>+	if (attr == NULL&&  die->parent->tag != DW_TAG_namespace)
> >>+	  return 0;
> >>+	return 1;
> >>+      }
> >>+      break;
> >>+
> >>      default:
> >>        return 0;
> >>      }
> >
> >What's this about?  It needs an explanation, and I don't think
> >DW_AT_specification has anything to do with die_needs_namespace.
> 
> DW_AT_specification is, as I deduce from ifdefing that out and
> running the testsuite :-), needed for many namespace-based variables:

DW_AT_specification is present for many variables in namespaces
(at least in current GCC output).  But what significance does it
actually have?  Can you explain the check above in terms of the DWARF
standard?  If not, I don't think it's right.

DW_AT_specification just says that there is a specification of this
variable in another DIE.  The same variable could be written with
or without it.

-- 
Daniel Jacobowitz
CodeSourcery


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