[llvm-dev] Instruction boundaries

via llvm-dev llvm-dev at lists.llvm.org
Mon Jun 25 11:38:32 PDT 2018

The main DWARF info should provide the code address ranges for each function, as well as the starting source location.  You could then use the line table to map code ranges to individual source lines.  That could give you a reasonable grasp of the source range for each function.
All addresses in the DWARF line table will be instruction addresses.  And in fact, all instructions should be described in the line table (assuming all source was compiled with debug info).

From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of Muhui Jiang via llvm-dev
Sent: Monday, June 25, 2018 11:36 AM
To: llvm-dev
Subject: [llvm-dev] Instruction boundaries


I was wondering whether there are any methods to know what part of the target binary is code.

I have some ideas and hope to get your comments.

I would like to use LLVM's source level debugging information to extract the source lines belonging to every functions. Then use the dwarf mapping table to transfer the  source level information to binary address. Are there any better methods?

Besides, is the address listed inside dwarf line mapping table must be code rather than data?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180625/528bd340/attachment.html>

More information about the llvm-dev mailing list