Hi,

As I understand, the DWARF tag DW_AT_external is meant to indicate whether a
variable/function is accessible from outside an object file(compilation unit)
containing a given DWARF DIE - Debugging Information Entry.

But it looks like DW_AT_external is also set for variables/functions defined in
a different object file, but has a DIE because of linking.

See: http://pastebin.com/vFiBWuhh

It has a small C++ program - greeting.cpp, with it's output and some DWARF
information.

As can be seen, the external flag is set for the standard library functions
such as - swscanf, ungetwd, or vfwprintf - which are not defined or used in
greeting.cpp, but are part of the object file because of linking.

This makes it *difficult* to locate the DIEs describing the functions that are
defined and/or used in greeting.cpp.

Thank you.


-- 
           Summary: DWARF DW_AT_external flag set for undefined variables
           Product: gcc
           Version: 4.4.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pj dot pandit at yahoo dot co dot in


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45153

Reply via email to