Hi Robin,

Did you add the extert  plugin signature in libr/include/r_cmd.h? I think
its the step you need.

Regards

2011/8/28 Robin Vossen <[email protected]>

> Hello,
>
> I wanted to write various small plugins for radare. Like unpacking
> UPX, hi-lighting structs and some other things.
> But my issue lies in the fact that radare is this deep dark secret
> code base and it's for me to hard to break through its thick shell.
> I can't seem to get the include right. I figured out I had to add my
> plugin to: libr/cmd/p/Makefile and plugins.def.cfg.
> Also I made the files already like so:
> robin% pwd ; ls
> /home/robin/repo/radare2/libr/cmd/p
> cmd_dummy.c  cmd_dummy.d  cmd_upx.c  cmd_upx.d  dummy.mk  Makefile  upx.mk
>
> But when I make I get:
> plugin.c:11:4: error: ‘r_cmd_plugin_upx’ undeclared here (not in a
> function)
> make[4]: *** [plugin.o] Error 1
> make[4]: Leaving directory `/home/robin/repo/radare2/libr/cmd'
> make[3]: *** [all] Error 2
> make[3]: Leaving directory `/home/robin/repo/radare2/libr/cmd'
> make[2]: *** [libs] Error 1
> make[2]: Leaving directory `/home/robin/repo/radare2/libr'
> make[1]: *** [libr] Error 2
> make[1]: Leaving directory `/home/robin/repo/radare2'
> make: *** [all] Error 2
>
> Sounds to me like I forgot something. When I looked at plugin.c line
> 11 I noticed it held a define there where I assume the given plugins
> will get stored in some kind of data format.
> Anyway, where should I add the definition for my plugin as well? What
> did I overlook?
>
> Small extra node, I am missing a PayPal donate button on the Radare
> webpage.. ?
>
> --
> Kind Regards,
> Robin Vossen
>
> Please avoid sending me Word, Excel or PowerPoint attachments. See
> http://www.gnu.org/philosophy/no-word-attachments.html
> _______________________________________________
> radare mailing list
> [email protected]
> http://lists.nopcode.org/listinfo.cgi/radare-nopcode.org
>
diff -r 505d9dfa8283 libr/include/r_cmd.h
--- a/libr/include/r_cmd.h	Sun Aug 28 01:49:29 2011 +0200
+++ b/libr/include/r_cmd.h	Sun Aug 28 21:39:05 2011 +0200
@@ -88,6 +88,7 @@
 
 /* plugins */
 extern struct r_cmd_plugin_t r_cmd_plugin_dummy;
+extern struct r_cmd_plugin_t r_cmd_plugin_upx;
 
 /* r_cmd_macro */
 R_API void r_cmd_macro_init(struct r_cmd_macro_t *mac);
_______________________________________________
radare mailing list
[email protected]
http://lists.nopcode.org/listinfo.cgi/radare-nopcode.org

Reply via email to