<div dir="ltr">Thanks Brendan. I'm sure you'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'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"><<a href="mailto:brendandg@nyu.edu" target="_blank">brendandg@nyu.edu</a>></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't have a prototype for<br>
NtUserCreateWindowEx, which means syscalls2 doesn'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>
<<a href="mailto:bridgeythegeek@gmail.com">bridgeythegeek@gmail.com</a>> wrote:<br>
> Hi PANDAs,<br>
><br>
> I'm trying to write a plugin to use alongside syscalls2 to handle<br>
> NtUserCreateWindowEx.<br>
><br>
> In the panda_plugins folder I've created a folder called 'usercreatewin'.<br>
> In that folder I have usercreatewin.cpp and Makefile.<br>
> I've added 'usercreatewin' to config.panda.<br>
><br>
> My init function looks like this:<br>
> bool init_plugin(void *self) {<br>
> PPP_REG_CB("syscalls2", on_NtUserCreateWindowEx_enter,<br>
> my_NtUserCreateWindowEx_enter);<br>
> return true;<br>
> }<br>
><br>
> The corresponding 'my_NtUserCreateWindowEx_enter' function is in my cpp file<br>
> as well.<br>
><br>
> When I issue 'make' I get:<br>
> --SNIP--<br>
> make[2]: Nothing to be done for 'all'.<br>
> CXX<br>
> /home/btg/src/panda/qemu/x86_64-softmmu/panda_plugins/usercreatewin.o<br>
> In file included from usercreatewin.cpp:5:0:<br>
> usercreatewin.cpp: In function ‘bool init_plugin(void*)’:<br>
> usercreatewin.cpp:29:29: error: ‘on_NtUserCreateWindowEx_enter_t’ was not<br>
> declared in this scope<br>
> PPP_REG_CB("syscalls2", on_NtUserCreateWindowEx_enter,<br>
> my_NtUserCreateWindowEx_enter);<br>
> ^<br>
> /home/btg/src/panda/qemu/panda_plugin_plugin.h:120:20: note: in definition<br>
> of macro ‘PPP_REG_CB’<br>
> void (*add_cb)(cb_name##_t fptr) = (void (*)(cb_name##_t)) dlsym(op,<br>
> "ppp_add_cb_" #cb_name); \<br>
> ^<br>
> /home/btg/src/panda/qemu/panda_plugin_plugin.h:120:38: error: expected ‘,’<br>
> or ‘;’ before ‘=’ token<br>
> void (*add_cb)(cb_name##_t fptr) = (void (*)(cb_name##_t)) dlsym(op,<br>
> "ppp_add_cb_" #cb_name); \<br>
> ^<br>
> usercreatewin.cpp:29:5: note: in expansion of macro ‘PPP_REG_CB’<br>
> PPP_REG_CB("syscalls2", on_NtUserCreateWindowEx_enter,<br>
> my_NtUserCreateWindowEx_enter);<br>
> ^<br>
> /home/btg/src/panda/qemu/panda_plugin_plugin.h:122:20: error: ‘add_cb’<br>
> cannot be used as a function<br>
> add_cb (cb_func); \<br>
> ^<br>
> usercreatewin.cpp:29:5: note: in expansion of macro ‘PPP_REG_CB’<br>
> PPP_REG_CB("syscalls2", on_NtUserCreateWindowEx_enter,<br>
> my_NtUserCreateWindowEx_enter);<br>
> ^<br>
> ../panda.mak:42: recipe for target<br>
> '/home/btg/src/panda/qemu/x86_64-softmmu/panda_plugins/usercreatewin.o'<br>
> failed<br>
> --SNIP--<br>
><br>
> It feels like I've forgotten something. Any help gratefully received!<br>
><br>
> Thanks,<br>
> Adam<br>
><br>
</div></div>> _______________________________________________<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/mailman/listinfo/panda-users</a><br>
><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>