[panda-users] PPP_REG_CB - What have I forgotten?
Bridgey theGeek
bridgeythegeek at gmail.com
Tue Jul 19 17:33:56 EDT 2016
Hi PANDAs,
I'm trying to write a plugin to use alongside syscalls2 to handle
NtUserCreateWindowEx.
In the panda_plugins folder I've created a folder called 'usercreatewin'.
In that folder I have usercreatewin.cpp and Makefile.
I've added 'usercreatewin' to config.panda.
My init function looks like this:
bool init_plugin(void *self) {
PPP_REG_CB("syscalls2", on_NtUserCreateWindowEx_enter,
my_NtUserCreateWindowEx_enter);
return true;
}
The corresponding 'my_NtUserCreateWindowEx_enter' function is in my cpp
file as well.
When I issue 'make' I get:
--SNIP--
make[2]: Nothing to be done for 'all'.
CXX
/home/btg/src/panda/qemu/x86_64-softmmu/panda_plugins/usercreatewin.o
In file included from usercreatewin.cpp:5:0:
usercreatewin.cpp: In function ‘bool init_plugin(void*)’:
usercreatewin.cpp:29:29: error: ‘on_NtUserCreateWindowEx_enter_t’ was not
declared in this scope
PPP_REG_CB("syscalls2", on_NtUserCreateWindowEx_enter,
my_NtUserCreateWindowEx_enter);
^
/home/btg/src/panda/qemu/panda_plugin_plugin.h:120:20: note: in definition
of macro ‘PPP_REG_CB’
void (*add_cb)(cb_name##_t fptr) = (void (*)(cb_name##_t)) dlsym(op,
"ppp_add_cb_" #cb_name); \
^
/home/btg/src/panda/qemu/panda_plugin_plugin.h:120:38: error: expected ‘,’
or ‘;’ before ‘=’ token
void (*add_cb)(cb_name##_t fptr) = (void (*)(cb_name##_t)) dlsym(op,
"ppp_add_cb_" #cb_name); \
^
usercreatewin.cpp:29:5: note: in expansion of macro ‘PPP_REG_CB’
PPP_REG_CB("syscalls2", on_NtUserCreateWindowEx_enter,
my_NtUserCreateWindowEx_enter);
^
/home/btg/src/panda/qemu/panda_plugin_plugin.h:122:20: error: ‘add_cb’
cannot be used as a function
add_cb (cb_func); \
^
usercreatewin.cpp:29:5: note: in expansion of macro ‘PPP_REG_CB’
PPP_REG_CB("syscalls2", on_NtUserCreateWindowEx_enter,
my_NtUserCreateWindowEx_enter);
^
../panda.mak:42: recipe for target
'/home/btg/src/panda/qemu/x86_64-softmmu/panda_plugins/usercreatewin.o'
failed
--SNIP--
It feels like I've forgotten something. Any help gratefully received!
Thanks,
Adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/panda-users/attachments/20160719/18c72486/attachment.html
More information about the panda-users
mailing list