[Dwarf-Discuss] Obtain DIE based on physical file offset
Sat Jul 25 17:17:05 GMT 2009
Florian Weimer wrote:
>> The .debug_line section relates program counter values to
>> source file and line.
> I haven't implemented it yet, but it looks doable. Thanks.
> I'm currently struggling with a way to obtain the function name for a
> PC value. This seems to be somewhat difficult because the DIE can be
> nested, and PC range information and function name information are
> sometimes split across multiple DIE. (I think I got it working for
> top-level functions, but not for C++ class members.)
To get the entire parent-child relationship of class members given classes
and derived classes you will quite possibly have to read an entire
compilation-unit's worth of DIEs and build some sort
of internal data structures for yourself. Possibly other CUs too
(though not usually). You already realized that, I gather.
No, there is no easier way.
More information about the Dwarf-discuss