Re: [DynInst_API:] getSourceLines()


Date: Tue, 02 Dec 2014 14:03:48 -0600
From: Bill Williams <bill@xxxxxxxxxxx>
Subject: Re: [DynInst_API:] getSourceLines()
On 12/02/2014 01:46 PM, Nathan McKain wrote:
Hello,
We’ve been attempting to pull source line numbers from our basic blocks using getSourceLines(), which is in BPatch_image.  We take the back() of the vector of BPatch_statements given by getSourceLines and print out its lineNumber().  This seems to work for the early blocks, with our first 20 or so blocks having no source line and then the next blocks correctly following the line numbers of our code.  After that, however, the remaining 300 or so of our 400-odd blocks all say they originate from the final line of our code.  Is this the output I should expect?  Furthermore, how should I interpret this output?  Is there a way to use the gcc toolchain to cross-check these values?
Thank you,

Should you expect this? We should hand back what the DWARF says--there's a bit of aggregation but not any substantial transformation that occurs. And it would be unusual for the DWARF to say this (but not impossible). If those blocks have no associated coherent line information, or if they don't correspond precisely to source code (e.g. implicitly generated functions), they might have a sensible source file and a "no concrete line" line number in the DWARF.

The addr2line tool can cross-check these values; it's using libdw rather than SGI/davea libdwarf as its back end.

Nathan McKain
_______________________________________________
Dyninst-api mailing list
Dyninst-api@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api



--
--bw

Bill Williams
Paradyn Project
bill@xxxxxxxxxxx
[← Prev in Thread] Current Thread [Next in Thread→]