This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap 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]

[Bug translator/6977] Incorrect resolution of variables in function scope


------- Additional Comments From prerna at linux dot vnet dot ibm dot com  2008-10-24 08:09 -------
IMHO,presently, in order to find a DWARF debugging information entry for a
global object name, the translator tries to search inside the parent scope
within the relevant compilation unit inside the .debug_info section of DWARF
information.

DWARF has another section ".debug_pubnames" which is a table listing the names
of global objects whose definitions or declarations are represented by debugging
information entries owned by each compilation unit.
However, this section cant be used directly for name lookup because :
1) the offset/object-name pairs are listed on a compilation-unit basis. So one
still has to determine which CU the global variable is defined to be able to
look up.
2) The section lists tuples which list the object name for a given offset for
each CU. (so a search on names is not possible)

For fast lookup, a table is needed which hashes a given global object name to
the CU in which it is defined and the offset within the .debug_info section
where its debuging information entry would be found. 

I'm not sure if such a structure ought to be included as a separate section in
dwarf itself or whether systemtap translator must build it independently based
on kernel debuginfo..


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=6977

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


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