diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2012-02-01 01:14:01 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2012-02-01 01:14:01 (GMT) |
commit | 14e82ed268cb78d62bbba93357fede5ece5c4f7d (patch) | |
tree | 76e146d4dcf7b6db67b51eb8f75a6c5e76bf6896 /src/debug | |
parent | eacb69625d51707ac0a158815a53f71fb70968ce (diff) |
Provided interfaces to use debuggers in plugins.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@231 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
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 |