This is the mail archive of the frysk@sourceware.org mailing list for the frysk 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: Elfutils: Resolving class member variables (was Re: Dwarf/libdw question)


Hi Roland,

Thank you for the thorough reply. You have probably answered any future questions I might have :)

Roland McGrath wrote:
Hi Sami. Please use more specific Subject lines in your postings.
Reading the list archives' index will not be very informative to
someone looking years from now for discussion on this particular topic.
Good point... will do.
First, the name resolution per se. First there are scopes inside a
subprogram DIE, same as in C. When you are dealing with a class method,
the subprogram's specification attribute gives you the declaration
inside the class scope (use dwarf_formref_die (dwarf_attr (...))). Then
use dwarf_getscopes_die on that to see the class, namespace, etc. scopes
containing it. For each of those, see if they have DW_TAG_inheritance,
DW_TAG_imported_declaration, etc. children that contribute more scopes
to the name resolution logic for the language. Among those you find a
member, variable, subprogram, etc. DIE by the name you are looking for.
I will try that.

Thanks,
 Sami


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