[gnome-builder] gdb: Pass breakpoint directly to remove effectively
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] gdb: Pass breakpoint directly to remove effectively
- Date: Mon, 6 Aug 2018 20:12:16 +0000 (UTC)
commit 2e209bf32a386ee0ee498f8de4466f9f6b8694ec
Author: Alberto Fanjul <albertofanjul gmail com>
Date: Sun Aug 5 12:43:08 2018 +0200
gdb: Pass breakpoint directly to remove effectively
src/plugins/gdb/gbp-gdb-debugger.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/src/plugins/gdb/gbp-gdb-debugger.c b/src/plugins/gdb/gbp-gdb-debugger.c
index a3e69ec85..aaeaca0be 100644
--- a/src/plugins/gdb/gbp-gdb-debugger.c
+++ b/src/plugins/gdb/gbp-gdb-debugger.c
@@ -1314,12 +1314,11 @@ gbp_gdb_debugger_remove_breakpoint_cb (GObject *object,
ide_task_return_error (task, g_steal_pointer (&error));
else
{
- const gchar *id = ide_task_get_task_data (task);
- g_autoptr(IdeDebuggerBreakpoint) breakpoint = NULL;
+ IdeDebuggerBreakpoint *breakpoint = ide_task_get_task_data (task);
- g_assert (id != NULL);
+ g_assert (IDE_IS_DEBUGGER_BREAKPOINT (breakpoint));
+ g_assert (ide_debugger_breakpoint_get_id (breakpoint) != NULL);
- breakpoint = ide_debugger_breakpoint_new (id);
ide_debugger_emit_breakpoint_removed (IDE_DEBUGGER (self), breakpoint);
ide_task_return_boolean (task, TRUE);
@@ -1349,7 +1348,7 @@ gbp_gdb_debugger_remove_breakpoint_async (IdeDebugger *debugger,
task = ide_task_new (self, cancellable, callback, user_data);
ide_task_set_priority (task, G_PRIORITY_LOW);
ide_task_set_source_tag (task, gbp_gdb_debugger_remove_breakpoint_async);
- ide_task_set_task_data (task, g_strdup (id), g_free);
+ ide_task_set_task_data (task, g_object_ref (breakpoint), g_object_unref);
ide_task_set_return_on_cancel (task, TRUE);
if (id == NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]