<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Dear All</p>
<p>I need to read the stackmap section at runtime of the inspected application. I've read the documentation of stackmap and found this paragraph:</p>
<p>"<span style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; font-size: 14px; line-height: 21px;">A JIT compiler can easily access this section by providing its own memory manager via the LLVM C API</span><span style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; font-size: 14px; line-height: 21px;"> </span><tt class="docutils literal" style="line-height: 21px; font-family: Consolas, 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; font-size: 0.95em;"><span class="pre">LLVMCreateSimpleMCJITMemoryManager()</span></tt><span style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; font-size: 14px; line-height: 21px;">.
 When creating the memory manager, the JIT provides a callback:</span><span style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; font-size: 14px; line-height: 21px;"> </span><tt class="docutils literal" style="line-height: 21px; font-family: Consolas, 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; font-size: 0.95em;"><span class="pre">LLVMMemoryManagerAllocateDataSectionCallback()</span></tt><span style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; font-size: 14px; line-height: 21px;">.
 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.</span></p>
<p style="margin: 0.8em 0px 0.5em; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; font-size: 14px; line-height: 21px;">
On Darwin, the stack map section name is “__llvm_stackmaps”. The segment name is “__LLVM_STACKMAPS”."</p>
<p style="margin: 0.8em 0px 0.5em; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; font-size: 14px; line-height: 21px;">
However I can't figure how to make <span style="font-family: Consolas, 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; font-size: 15.1999998092651px;">LLVMCreateSimpleMCJITMemoryManager or </span><span style="font-family: Consolas, 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; font-size: 15.1999998092651px;">LLVMMemoryManagerAllocateDataSectionCallback
 or make use of them. And I could not find examples for their useage. Any help is appreciated.</span></p>
<p><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<div class="BodyFragment"><font size="2"><span style="font-size:10pt">
<div class="PlainText">Regards,<br>
Marwa Yusuf<br>
Teaching Assistant - Computer Engineering Department<br>
Faculty of Engineering - Benha University<br>
E-JUST PhD Student<br>
Computer Science & Engineering Dept.</div>
</span></font></div>
</div>
</div>
</div>
</body>
</html>