[gnome-builder/wip/chergert/debugger: 67/134] debugger: add IdeDebugger::prepare() vfunc
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/debugger: 67/134] debugger: add IdeDebugger::prepare() vfunc
- Date: Fri, 31 Mar 2017 17:59:35 +0000 (UTC)
commit 21bcc535dfe7818522a293931372f0c04b7ffca0
Author: Christian Hergert <chergert redhat com>
Date: Wed Mar 22 17:09:27 2017 -0700
debugger: add IdeDebugger::prepare() vfunc
This allows the debugger to setup things before we launch the applicaiton.
It is important that this succeeds, as the debugger has already said it
can support the runner via ::supports_runner()
libide/debugger/ide-debug-manager.c | 2 ++
libide/debugger/ide-debugger.c | 11 +++++++++++
libide/debugger/ide-debugger.h | 4 ++++
3 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/libide/debugger/ide-debug-manager.c b/libide/debugger/ide-debug-manager.c
index f485e9d..a9d6316 100644
--- a/libide/debugger/ide-debug-manager.c
+++ b/libide/debugger/ide-debug-manager.c
@@ -249,6 +249,8 @@ ide_debug_manager_start (IdeDebugManager *self,
IDE_GOTO (failure);
}
+ ide_debugger_prepare (debugger, runner);
+
ret = TRUE;
failure:
diff --git a/libide/debugger/ide-debugger.c b/libide/debugger/ide-debugger.c
index c2644fa..8c42932 100644
--- a/libide/debugger/ide-debugger.c
+++ b/libide/debugger/ide-debugger.c
@@ -162,3 +162,14 @@ ide_debugger_emit_stopped (IdeDebugger *self,
g_signal_emit (self, signals [STOPPED], 0, reason, location);
}
+
+void
+ide_debugger_prepare (IdeDebugger *self,
+ IdeRunner *runner)
+{
+ g_return_if_fail (IDE_IS_DEBUGGER (self));
+ g_return_if_fail (IDE_IS_RUNNER (runner));
+
+ if (IDE_DEBUGGER_GET_IFACE (self)->prepare)
+ IDE_DEBUGGER_GET_IFACE (self)->prepare (self, runner);
+}
diff --git a/libide/debugger/ide-debugger.h b/libide/debugger/ide-debugger.h
index 9c4e844..9dd3125 100644
--- a/libide/debugger/ide-debugger.h
+++ b/libide/debugger/ide-debugger.h
@@ -48,12 +48,16 @@ struct _IdeDebuggerInterface
void (*stopped) (IdeDebugger *self,
IdeDebuggerStopReason reason,
IdeSourceLocation *location);
+ void (*prepare) (IdeDebugger *debugger,
+ IdeRunner *runner);
};
gchar *ide_debugger_get_name (IdeDebugger *self);
gboolean ide_debugger_supports_runner (IdeDebugger *self,
IdeRunner *runner,
gint *priority);
+void ide_debugger_prepare (IdeDebugger *self,
+ IdeRunner *runner);
void ide_debugger_emit_stopped (IdeDebugger *self,
IdeDebuggerStopReason reason,
IdeSourceLocation *location);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]