diff options
Diffstat (limited to 'src/debug')
-rw-r--r-- | src/debug/debugger.c | 22 | ||||
-rw-r--r-- | src/debug/debugger.h | 3 | ||||
-rw-r--r-- | src/debug/debuggers.c | 0 | ||||
-rw-r--r-- | src/debug/debuggers.h | 0 |
4 files changed, 23 insertions, 2 deletions
diff --git a/src/debug/debugger.c b/src/debug/debugger.c index 6a9c7a2..d08bd26 100644 --- a/src/debug/debugger.c +++ b/src/debug/debugger.c @@ -2,7 +2,7 @@ /* OpenIDA - Outil d'analyse de fichiers binaires * debugger.c - gestion des différents débogueurs * - * Copyright (C) 2010-2011 Cyrille Bagard + * Copyright (C) 2010-2012 Cyrille Bagard * * This file is part of OpenIDA. * @@ -24,8 +24,10 @@ #include "debugger.h" #include "debugger-int.h" +#include "jdwp/debugger.h" #include "remgdb/gdb.h" #include "../gtkext/iodamarshal.h" +#include "../plugins/pglist.h" @@ -112,6 +114,10 @@ GBinaryDebugger *g_new_binary_debugger(DebuggerType type, GOpenidaBinary *binary switch (type) { + case DGT_JDWP: + result = g_java_debugger_new(binary, NULL); + break; + case DGT_REMOTE_GDB: result = g_gdb_debugger_new(binary, NULL); break; @@ -145,10 +151,24 @@ GBinaryDebugger *g_new_binary_debugger(DebuggerType type, GOpenidaBinary *binary bool g_binary_debugger_attach(GBinaryDebugger *debugger) { bool result; /* Bilan à retourner */ + GPluginModule **pglist; /* Liste de greffons */ + size_t pgcount; /* Taille de cette liste */ + size_t i; /* Boucle de parcours */ if (debugger->attach == NULL) result = true; else result = debugger->attach(debugger); + pglist = get_all_plugins_for_action(PGA_DEBUGGER_ATTACH, &pgcount); + + if (pgcount > 0) + { + for (i = 0; i < pgcount; i++) + g_plugin_module_handle_debugger(pglist[i], debugger, PGA_DEBUGGER_ATTACH); + + free(pglist); + + } + return result; } diff --git a/src/debug/debugger.h b/src/debug/debugger.h index 12660eb..f57a9f0 100644 --- a/src/debug/debugger.h +++ b/src/debug/debugger.h @@ -2,7 +2,7 @@ /* OpenIDA - Outil d'analyse de fichiers binaires * debugger.h - prototypes pour la gestion des différents débogueurs * - * Copyright (C) 2010-2011 Cyrille Bagard + * Copyright (C) 2010-2012 Cyrille Bagard * * This file is part of OpenIDA. * @@ -37,6 +37,7 @@ /* Liste de tous les débogueurs */ typedef enum _DebuggerType { + DGT_JDWP, /* Utilisation du JDWP */ DGT_REMOTE_GDB, /* Utilisation de GDB */ DGT_PTRACE, /* Utilisation de ptrace() */ diff --git a/src/debug/debuggers.c b/src/debug/debuggers.c deleted file mode 100644 index e69de29..0000000 --- a/src/debug/debuggers.c +++ /dev/null diff --git a/src/debug/debuggers.h b/src/debug/debuggers.h deleted file mode 100644 index e69de29..0000000 --- a/src/debug/debuggers.h +++ /dev/null |