Re: [DynInst_API:] getSourceLines()


Date: Wed, 3 Dec 2014 09:30:47 -0800 (PST)
From: Matthew LeGendre <legendre1@xxxxxxxx>
Subject: Re: [DynInst_API:] getSourceLines()

I've seen similar behavior on binaries built with the Intel compiler. It sometimes produces a bad DWARF entry that spans a huge address range, and thus lots of blocks get associated with a single line number. In this case the correct line information is also available, so you get multiple line entries for one address.

One work-around is to look through the vector of line entries and output the one with the smallest range, since the bad entry usually has a very range.

You can check if this is happening with a 'dwarfdump -l <binary>' (dwarfdump is available from libdwarf). Look for the large entry and see if there's anything obviously wrong with it.

-Matt

On Tue, 2 Dec 2014, 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,

Nathan McKain
_______________________________________________
Dyninst-api mailing list
Dyninst-api@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api
[← Prev in Thread] Current Thread [Next in Thread→]