[LLVMdev] LLVM Metadata to Dwarf tags
Aaron Kobayashi
aaron.kobayashi at gmail.com
Sun Mar 25 15:11:14 PDT 2012
Hi everyone,
I'm working on a project where I need to add the addresses's of specific
instructions to the DWARF output.
I've been digging around for the last week or so trying to figure out
exactly what I need to do, but this is my first list posting.
I came across this posting:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2010-September/034464.html
which seems to be doing almost exactly what I want to do, however it was
created with LLVM 2.7 in mind. Since then, from what I can tell, the LLVM
MC project has been created and blown away the usefulness of the
descriptions contained in that thread.
(Example: AsmPrinter::processDebugLoc() no longer exists). Does anyone
have any pointers on how to update this for LLVM/clang 3.0?
To be more specific, I've added a special stack guard intrinsic similar to
StackProtector.cpp which uses a per function random immediate instead
of ___stack_chk_guard. What I am trying to accomplish is to get the offset
into the final x86 object file of each one of these immediate values.
An example of the output in Assembly looks like:
movq $653406579, -8(%rbp) ## imm = 0x26F23173
In reality, I'd settle for a simple way to get the offset into the Obj file
of the movq instruction that I could putput to a separate file, but It'd be
better if I could get it into the DWARF tags.
Does anyone have any familiarity with this to give me some pointers?
Thanks,
AK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120325/10935a02/attachment.html>
More information about the llvm-dev
mailing list