Saturday night stack tracing

Robert Fraser fraserofthenight at gmail.com
Mon Jan 14 17:27:08 PST 2008


Jascha Wetzel wrote:
> Robert Fraser wrote:
>> Hi --
>>
>> I've been using Flectioned for stack tracing, which has been doing 
>> some wonderful things to me. However, the stack trace, though nice, 
>> doesn't show the file/line where each function is defined. This isn't 
>> a MAJOR problem for me, since I can report the function overload & 
>> search for the function based on that, however in the interests of 
>> time it might be nice to get the exact line the function was called on.
>>
>> Is there any way to do this, perhaps by using the debug info & 
>> comparing the call address against that somehow? I'm not too up on 
>> these things, but it seems like it would be possible.
>>
>> Thanks!
> 
> you'll need to parse the debug info that contains lists of address-range 
> to line number mappings. if you're interested in doing this, i can give 
> you the ddbg source to check out how it's done for codeview debug info. 
> for dwarf there is libdwarf, which appears to be pretty good. i'd 
> recommend looking at that before implementing a dwarf parser from scratch.

Thanks! Could you send me the source just related to the line no. stuff?


More information about the Digitalmars-d-learn mailing list