<div dir="ltr">Thanks Brendan. I&#39;m sure you&#39;re right: I need to add the prototype.<div>However, this specific issue was the error I was seeing was when it was trying to compile for ARM.</div><div>I needed to add the: #ifdef TARGET_I386 to my code.</div><div><br></div><div>If/when I can prove my prototype I&#39;ll definitely make a pull request.</div><div><br></div><div>Thanks again,</div><div>Adam</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 19 July 2016 at 22:39, Brendan Dolan-Gavitt <span dir="ltr">&lt;<a href="mailto:brendandg@nyu.edu" target="_blank">brendandg@nyu.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I think the issue is that we don&#39;t have a prototype for<br>
NtUserCreateWindowEx, which means syscalls2 doesn&#39;t have a callback<br>
for it. If you know the prototype, you can add it to<br>
panda_plugins/syscalls2/all_windows_prototypes.txt, run<br>
createWindowsPrototypes.py, and then run recreate_all_os_arch.sh and<br>
it will add the appropriate callback.<br>
<br>
At that point (assuming everything works), it would be great if you<br>
created a pull request so that others can benefit as well!<br>
<br>
-Brendan<br>
<div><div class="h5"><br>
On Tue, Jul 19, 2016 at 5:33 PM, Bridgey theGeek<br>
&lt;<a href="mailto:bridgeythegeek@gmail.com">bridgeythegeek@gmail.com</a>&gt; wrote:<br>
&gt; Hi PANDAs,<br>
&gt;<br>
&gt; I&#39;m trying to write a plugin to use alongside syscalls2 to handle<br>
&gt; NtUserCreateWindowEx.<br>
&gt;<br>
&gt; In the panda_plugins folder I&#39;ve created a folder called &#39;usercreatewin&#39;.<br>
&gt; In that folder I have usercreatewin.cpp and Makefile.<br>
&gt; I&#39;ve added &#39;usercreatewin&#39; to config.panda.<br>
&gt;<br>
&gt; My init function looks like this:<br>
&gt; bool init_plugin(void *self) {<br>
&gt;     PPP_REG_CB(&quot;syscalls2&quot;, on_NtUserCreateWindowEx_enter,<br>
&gt; my_NtUserCreateWindowEx_enter);<br>
&gt;     return true;<br>
&gt; }<br>
&gt;<br>
&gt; The corresponding &#39;my_NtUserCreateWindowEx_enter&#39; function is in my cpp file<br>
&gt; as well.<br>
&gt;<br>
&gt; When I issue &#39;make&#39; I get:<br>
&gt; --SNIP--<br>
&gt; make[2]: Nothing to be done for &#39;all&#39;.<br>
&gt;   CXX<br>
&gt; /home/btg/src/panda/qemu/x86_64-softmmu/panda_plugins/usercreatewin.o<br>
&gt; In file included from usercreatewin.cpp:5:0:<br>
&gt; usercreatewin.cpp: In function ‘bool init_plugin(void*)’:<br>
&gt; usercreatewin.cpp:29:29: error: ‘on_NtUserCreateWindowEx_enter_t’ was not<br>
&gt; declared in this scope<br>
&gt;      PPP_REG_CB(&quot;syscalls2&quot;, on_NtUserCreateWindowEx_enter,<br>
&gt; my_NtUserCreateWindowEx_enter);<br>
&gt;                              ^<br>
&gt; /home/btg/src/panda/qemu/panda_plugin_plugin.h:120:20: note: in definition<br>
&gt; of macro ‘PPP_REG_CB’<br>
&gt;      void (*add_cb)(cb_name##_t fptr) = (void (*)(cb_name##_t)) dlsym(op,<br>
&gt; &quot;ppp_add_cb_&quot; #cb_name); \<br>
&gt;                     ^<br>
&gt; /home/btg/src/panda/qemu/panda_plugin_plugin.h:120:38: error: expected ‘,’<br>
&gt; or ‘;’ before ‘=’ token<br>
&gt;      void (*add_cb)(cb_name##_t fptr) = (void (*)(cb_name##_t)) dlsym(op,<br>
&gt; &quot;ppp_add_cb_&quot; #cb_name); \<br>
&gt;                                       ^<br>
&gt; usercreatewin.cpp:29:5: note: in expansion of macro ‘PPP_REG_CB’<br>
&gt;      PPP_REG_CB(&quot;syscalls2&quot;, on_NtUserCreateWindowEx_enter,<br>
&gt; my_NtUserCreateWindowEx_enter);<br>
&gt;      ^<br>
&gt; /home/btg/src/panda/qemu/panda_plugin_plugin.h:122:20: error: ‘add_cb’<br>
&gt; cannot be used as a function<br>
&gt;      add_cb (cb_func);       \<br>
&gt;                     ^<br>
&gt; usercreatewin.cpp:29:5: note: in expansion of macro ‘PPP_REG_CB’<br>
&gt;      PPP_REG_CB(&quot;syscalls2&quot;, on_NtUserCreateWindowEx_enter,<br>
&gt; my_NtUserCreateWindowEx_enter);<br>
&gt;      ^<br>
&gt; ../panda.mak:42: recipe for target<br>
&gt; &#39;/home/btg/src/panda/qemu/x86_64-softmmu/panda_plugins/usercreatewin.o&#39;<br>
&gt; failed<br>
&gt; --SNIP--<br>
&gt;<br>
&gt; It feels like I&#39;ve forgotten something. Any help gratefully received!<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Adam<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; panda-users mailing list<br>
&gt; <a href="mailto:panda-users@mit.edu">panda-users@mit.edu</a><br>
&gt; <a href="http://mailman.mit.edu/mailman/listinfo/panda-users" rel="noreferrer" target="_blank">http://mailman.mit.edu/mailman/listinfo/panda-users</a><br>
&gt;<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
Brendan Dolan-Gavitt<br>
Assistant Professor, Department of Computer Science and Engineering<br>
NYU Tandon School of Engineering<br>
</font></span></blockquote></div><br></div>