[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
Wed Jul 25 10:34:34 PDT 2018


Yes, I did. I have checked my math and I just can't understand how the
data is valid. Again typing below from my original email what I'm
doing which I've confirmed with many sources is what SHOULD be done.
Can anyone else spot something wrong?

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

And I can't find this RVA (not even close) in the llvm-pdbdump output.
On Sun, Mar 4, 2018 at 2:06 PM Jordan Frost <jordanfrostfs at gmail.com> wrote:
>
> Before all that did you verify that LLVM's tool matches Microsoft's CVDump?
>
> LLVM's tool is still somewhat young though I haven't run into problems recently (~ Jan 2018)
>
>
> On Sat, Mar 3, 2018 at 10:34 AM, Hayden Livingston via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>>
>> I will build LLVM locally, debug and report back.
>>
>> On Sat, Mar 3, 2018 at 2:47 AM, Hayden Livingston
>> <halivingston at gmail.com> wrote:
>> > 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?
>> _______________________________________________
>> LLVM Developers mailing list
>> llvm-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>


More information about the llvm-dev mailing list