<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<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;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Dear Brendan,</p>
<p><br>
</p>
<p>Thank you for the answer but during the building phase (i.e. after that I launch build.sh) I get the following error:</p>
<p><br>
</p>
<p></p>
<div>panda/plugins/myfirstplugin.c:42:13: error: ‘CPUState’ has no member named ‘regs’
<br>
</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pc, env-&gt;regs[R_EAX]);</div>
<div><br>
</div>
<div>All the other files are correctly compiled so I don't have any idea. <br>
</div>
<div>Obviously env is a CPUState* variable. My included files are:</div>
<div><br>
</div>
<div>
<div>#include &quot;panda/plugin.h&quot;<br>
#include &quot;panda/plugin_plugin.h&quot;<br>
#include &quot;cpu.h&quot;<br>
#include &quot;qemu-common.h&quot;</div>
<div><br>
</div>
<div>Do you know what is the problem?</div>
<div>greetings to all<br>
</div>
<br>
</div>
<br>
<p></p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>Da:</b> Brendan Dolan-Gavitt &lt;brendandg@nyu.edu&gt;<br>
<b>Inviato:</b> venerdì 3 novembre 2017 17:02<br>
<b>A:</b> alessandro mantovani<br>
<b>Cc:</b> panda-users@mit.edu<br>
<b>Oggetto:</b> Re: [panda-users] Plugin</font>
<div>&nbsp;</div>
</div>
<div>
<div dir="ltr">Put it in the panda/plugins directory and then add the name of the plugin to panda/plugins/config.panda. Then just run build.sh as normal and your plugin will be built with the others. It is also possible to have an &quot;external plugins&quot; path, see
 here for details:
<div><br>
</div>
<div><a href="https://github.com/panda-re/panda/blob/4d1e32541d1f9e79abc8b7706669a95d3fcb7a2f/panda/docs/manual.md#personal-plugins" id="LPlnk212661" previewremoved="true">https://github.com/panda-re/panda/blob/4d1e32541d1f9e79abc8b7706669a95d3fcb7a2f/panda/docs/manual.md#personal-plugins</a>
<div id="LPBorder_GT_15098226845600.6599008466126686" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_15098226845520.24308928926247897" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);" role="presentation" cellspacing="0">
<tbody>
<tr style="border-spacing: 0px;" valign="top">
<td id="ImageCell_15098226845530.3997214158170095" style="width: 250px; position: relative; display: table-cell; padding-right: 20px;" colspan="1">
<div id="LPImageContainer_15098226845530.9046132705200602" style="background-color: rgb(255, 255, 255); height: 250px; position: relative; margin: auto; display: table; width: 250px;">
<a id="LPImageAnchor_15098226845540.7941027087199549" style="display: table-cell; text-align: center;" href="https://github.com/panda-re/panda/blob/4d1e32541d1f9e79abc8b7706669a95d3fcb7a2f/panda/docs/manual.md#personal-plugins" target="_blank"><img style="display: inline-block; max-width: 250px; max-height: 250px; height: 250px; width: 250px; border-width: 0px; vertical-align: bottom;" id="LPThumbnailImageID_15098226845550.25946596231593544" width="250" height="250" src="https://avatars1.githubusercontent.com/u/16124198?s=400&amp;v=4"></a></div>
</td>
<td id="TextCell_15098226845560.12578831194922258" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;" colspan="2">
<div id="LPRemovePreviewContainer_15098226845560.6146059540911536"></div>
<div id="LPExpandDescriptionContainer_15098226845560.8881102697757849"></div>
<div id="LPTitle_15098226845560.7058263915490041" style="top: 0px; color: rgb(0, 120, 215); font-weight: 400; font-size: 21px; font-family: &quot;wf_segoe-ui_light&quot;,&quot;Segoe UI Light&quot;,&quot;Segoe WP Light&quot;,&quot;Segoe UI&quot;,&quot;Segoe WP&quot;,Tahoma,Arial,sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_15098226845570.8413501130113494" style="text-decoration: none;" href="https://github.com/panda-re/panda/blob/4d1e32541d1f9e79abc8b7706669a95d3fcb7a2f/panda/docs/manual.md#personal-plugins" target="_blank">panda-re/panda</a></div>
<div id="LPMetadata_15098226845570.14327266664911764" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: 400; font-family: &quot;wf_segoe-ui_normal&quot;,&quot;Segoe UI&quot;,&quot;Segoe WP&quot;,Tahoma,Arial,sans-serif; font-size: 14px; line-height: 14px;">
github.com</div>
<div id="LPDescription_15098226845570.5884090310025817" style="display: block; color: rgb(102, 102, 102); font-weight: 400; font-family: &quot;wf_segoe-ui_normal&quot;,&quot;Segoe UI&quot;,&quot;Segoe WP&quot;,Tahoma,Arial,sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;" altdesc="Once you've captured a replay, you should be able to play it over and over again. We typically begin by using standard analyses to try and get a basic picture of what's going on, followed by custom plugins to get more specific analysis.&lt;br/&gt;&lt;br/&gt;These functions enable and disable the use of the LLVM JIT in replacement of the TCG (QEMU intermediate language and compiler) backend. Here, an additional translation step is added from the TCG IR to the LLVM IR, and that is executed on the LLVM JIT.&lt;br/&gt;&lt;br/&gt;PANDA supports whole system deterministic record and replay in whole system mode on the i386, x86_64, and arm targets. We hope to add more soon; for example, partial SPARC support exists but is not yet reliable.">
panda - Platform for Architecture-Neutral Dynamic Analysis</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
</div>
</div>
<div class="x_gmail_extra"><br>
<div class="x_gmail_quote">On Fri, Nov 3, 2017 at 11:56 AM, alessandro mantovani <span dir="ltr">
&lt;<a href="mailto:alk13@hotmail.it" target="_blank">alk13@hotmail.it</a>&gt;</span> wrote:<br>
<blockquote class="x_gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr">
<div id="x_m_3699392511106330615divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>Hi all,</p>
<p><br>
</p>
<p>I have written my first plugin but I don't know what I've to do now. How can I compile and build it so that it can be called in command line through the '-panda' option? (i.e. exactly like the other plugins already written)</p>
<p><br>
</p>
<p>Thank you<br>
</p>
</div>
</div>
<br>
______________________________<wbr>_________________<br>
panda-users mailing list<br>
<a href="mailto:panda-users@mit.edu">panda-users@mit.edu</a><br>
<a href="http://mailman.mit.edu/mailman/listinfo/panda-users" rel="noreferrer" target="_blank">http://mailman.mit.edu/<wbr>mailman/listinfo/panda-users</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="x_gmail_signature">Brendan Dolan-Gavitt<br>
Assistant Professor, Department of Computer Science and Engineering<br>
NYU Tandon School of Engineering</div>
</div>
</div>
</div>
</div>
</body>
</html>