summaryrefslogtreecommitdiff
path: root/src/debug/debugger.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug/debugger.c')
-rw-r--r--src/debug/debugger.c22
1 files changed, 21 insertions, 1 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;
}