[gnome-builder/wip/chergert/bug1: 61/69] debugger: add some plumbing to update break line
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/bug1: 61/69] debugger: add some plumbing to update break line
- Date: Sat, 2 Sep 2017 02:06:53 +0000 (UTC)
commit c7864ed3122bf50bfc1d12c9485754f4dbd43b2d
Author: Christian Hergert <chergert redhat com>
Date: Thu Aug 31 13:43:03 2017 -0700
debugger: add some plumbing to update break line
Just some plumbing, still needs implementation
libide/debugger/ide-debug-manager.c | 95 ++++++++++++++++++++++++++++------
1 files changed, 78 insertions(+), 17 deletions(-)
---
diff --git a/libide/debugger/ide-debug-manager.c b/libide/debugger/ide-debug-manager.c
index 2f9d847..83c7f01 100644
--- a/libide/debugger/ide-debug-manager.c
+++ b/libide/debugger/ide-debug-manager.c
@@ -195,13 +195,34 @@ ide_debug_manager_breakpoint_modified (IdeDebugManager *self,
}
static void
-ide_debug_manager_finalize (GObject *object)
+ide_debug_manager_real_breakpoint_reached (IdeDebugManager *self,
+ IdeDebuggerBreakpoint *breakpoint)
+{
+
+ g_assert (IDE_IS_DEBUG_MANAGER (self));
+ g_assert (IDE_IS_DEBUGGER_BREAKPOINT (breakpoint));
+
+}
+
+static void
+ide_debug_manager_dispose (GObject *object)
{
IdeDebugManager *self = (IdeDebugManager *)object;
+ g_hash_table_remove_all (self->breakpoints);
+ dzl_signal_group_set_target (self->debugger_signals, NULL);
g_clear_object (&self->debugger);
- g_clear_object (&self->debugger_signals);
g_clear_object (&self->runner);
+
+ G_OBJECT_CLASS (ide_debug_manager_parent_class)->dispose (object);
+}
+
+static void
+ide_debug_manager_finalize (GObject *object)
+{
+ IdeDebugManager *self = (IdeDebugManager *)object;
+
+ g_clear_object (&self->debugger_signals);
g_clear_pointer (&self->breakpoints, g_hash_table_unref);
G_OBJECT_CLASS (ide_debug_manager_parent_class)->finalize (object);
@@ -235,6 +256,7 @@ ide_debug_manager_class_init (IdeDebugManagerClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ object_class->dispose = ide_debug_manager_dispose;
object_class->finalize = ide_debug_manager_finalize;
object_class->get_property = ide_debug_manager_get_property;
@@ -262,26 +284,65 @@ ide_debug_manager_class_init (IdeDebugManagerClass *klass)
g_object_class_install_properties (object_class, N_PROPS, properties);
+ /**
+ * IdeDebugManager::breakpoint-added:
+ * @self: An #IdeDebugManager
+ * @breakpoint: an #IdeDebuggerBreakpoint
+ *
+ * The "breakpoint-added" signal is emitted when a new breakpoint has
+ * been registered by the debugger.
+ *
+ * Since: 3.26
+ */
signals [BREAKPOINT_ADDED] =
- g_signal_new ("breakpoint-added",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST,
- 0, NULL, NULL, NULL,
- G_TYPE_NONE, 1, IDE_TYPE_DEBUGGER_BREAKPOINT);
+ g_signal_new_class_handler ("breakpoint-added",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST,
+ NULL, NULL, NULL,
+ g_cclosure_marshal_VOID__OBJECT,
+ G_TYPE_NONE, 1, IDE_TYPE_DEBUGGER_BREAKPOINT);
+ /**
+ * IdeDebugManager::breakpoint-removed:
+ * @self: An #IdeDebugManager
+ * @breakpoint: an #IdeDebuggerBreakpoint
+ *
+ * The "breakpoint-removed" signal is emitted when a new breakpoint has been
+ * removed by the debugger.
+ *
+ * Since: 3.26
+ */
signals [BREAKPOINT_REMOVED] =
- g_signal_new ("breakpoint-removed",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST,
- 0, NULL, NULL, NULL,
- G_TYPE_NONE, 1, IDE_TYPE_DEBUGGER_BREAKPOINT);
+ g_signal_new_class_handler ("breakpoint-removed",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST,
+ NULL, NULL, NULL,
+ g_cclosure_marshal_VOID__OBJECT,
+ G_TYPE_NONE, 1, IDE_TYPE_DEBUGGER_BREAKPOINT);
+ /**
+ * IdeDebugManager::breakpoint-reached:
+ * @self: An #IdeDebugManager
+ * @breakpoint: An #IdeDebuggerBreakpoint
+ *
+ * The "breakpoint-reached" signal is emitted when the debugger has reached
+ * a breakpoint and execution has stopped.
+ *
+ * If you need the stop reason, you should connect to #IdeDebugger::stopped
+ * on the #IdeDebugger itself.
+ *
+ * See also: #IdeDebugManager:debugger
+ *
+ * Since: 3.26
+ */
signals [BREAKPOINT_REACHED] =
- g_signal_new ("breakpoint-reached",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST,
- 0, NULL, NULL, NULL,
- G_TYPE_NONE, 1, IDE_TYPE_DEBUGGER_BREAKPOINT);
+ g_signal_new_class_handler ("breakpoint-reached",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST,
+ G_CALLBACK (ide_debug_manager_real_breakpoint_reached),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__OBJECT,
+ G_TYPE_NONE, 1, IDE_TYPE_DEBUGGER_BREAKPOINT);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]