[llvm-dev] llvm pdb utility question - how to convert real address to a segmented one

Hayden Livingston via llvm-dev llvm-dev at lists.llvm.org
Sat Mar 3 02:47:12 PST 2018


I've just started using the llvm-pdbutil tool. Great job on the general tool.

But I'm having trouble figuring out how the output of the dump tool
relates to real addresses in memory or for that matter relative
virtual address either.

Here's the logic I tried (which doesn't work):

(1) Get Instruction Pointer of interest
(2) Subtract the base address of the dll that address belongs to
(3) You now have an RVA

Use llvm-pdbutil to dump the pdb information.

The problem is I'm unable to find (or approximate) this RVA in the
dump information. The numbers in the llvm dumped files are in the form
segment:offset but even after accounting for the segment, the offsets
look way off.

Does anybody have any idea what I might be doing wrong?


More information about the llvm-dev mailing list