From 262db6bececb4dddc9fd2ac8d171825bbd90322b Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Mon, 15 Aug 2011 16:08:26 -0700 Subject: plugin: Add debug support for external plugins --- include/plugin.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/plugin.h b/include/plugin.h index 4b9d5407..74ac4c2a 100644 --- a/include/plugin.h +++ b/include/plugin.h @@ -23,6 +23,7 @@ #define __CONNMAN_PLUGIN_H #include +#include #ifdef __cplusplus extern "C" { @@ -50,6 +51,8 @@ struct connman_plugin_desc { int priority; int (*init) (void); void (*exit) (void); + void *debug_start; + void *debug_stop; }; /** @@ -85,10 +88,15 @@ struct connman_plugin_desc { }; #else #define CONNMAN_PLUGIN_DEFINE(name, description, version, priority, init, exit) \ + extern struct connman_debug_desc __start___debug[] \ + __attribute__ ((visibility("hidden"))); \ + extern struct connman_debug_desc __stop___debug[] \ + __attribute__ ((visibility("hidden"))); \ extern struct connman_plugin_desc connman_plugin_desc \ __attribute__ ((visibility("default"))); \ struct connman_plugin_desc connman_plugin_desc = { \ - #name, description, version, priority, init, exit \ + #name, description, version, priority, init, exit, \ + __start___debug, __stop___debug \ }; #endif -- cgit v1.2.3