[llvm-dev] About Stackmap section

marwayusuf@feng.bu.edu.eg via llvm-dev llvm-dev at lists.llvm.org
Sun Aug 9 07:43:04 PDT 2015


Dear All

I need to read the stackmap section at runtime of the inspected application. I've read the documentation of stackmap and found this paragraph:

"A JIT compiler can easily access this section by providing its own memory manager via the LLVM C API LLVMCreateSimpleMCJITMemoryManager(). When creating the memory manager, the JIT provides a callback: LLVMMemoryManagerAllocateDataSectionCallback(). When LLVM creates this section, it invokes the callback and passes the section name. The JIT can record the in-memory address of the section at this time and later parse it to recover the stack map data.

On Darwin, the stack map section name is "__llvm_stackmaps". The segment name is "__LLVM_STACKMAPS"."

However I can't figure how to make LLVMCreateSimpleMCJITMemoryManager or LLVMMemoryManagerAllocateDataSectionCallback or make use of them. And I could not find examples for their useage. Any help is appreciated.


Regards,
Marwa Yusuf
Teaching Assistant - Computer Engineering Department
Faculty of Engineering - Benha University
E-JUST PhD Student
Computer Science & Engineering Dept.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150809/ff7f1982/attachment.html>


More information about the llvm-dev mailing list