[gnome-builder/wip/chergert/bug1: 45/101] debugger: various cleanups and defensiveness



commit 37d3a14b2d1ae5d84cc4c44480967af9b0ddb9b7
Author: Christian Hergert <chergert redhat com>
Date:   Sat Aug 26 21:21:49 2017 -0700

    debugger: various cleanups and defensiveness

 libide/debugger/ide-debugger-perspective.c  |   19 ++++++++++++++-----
 libide/debugger/ide-debugger-perspective.ui |    8 +-------
 plugins/gdb/gbp-gdb-debugger.c              |    4 +++-
 3 files changed, 18 insertions(+), 13 deletions(-)
---
diff --git a/libide/debugger/ide-debugger-perspective.c b/libide/debugger/ide-debugger-perspective.c
index 72c011d..2aad091 100644
--- a/libide/debugger/ide-debugger-perspective.c
+++ b/libide/debugger/ide-debugger-perspective.c
@@ -224,11 +224,20 @@ ide_debugger_perspective_unbind (IdeDebuggerPerspective *self,
   g_assert (IDE_IS_DEBUGGER_PERSPECTIVE (self));
   g_assert (DZL_IS_SIGNAL_GROUP (debugger_signals));
 
-  ide_debugger_breakpoints_view_set_debugger (self->breakpoints_view, NULL);
-  ide_debugger_libraries_view_set_debugger (self->libraries_view, NULL);
-  ide_debugger_locals_view_set_debugger (self->locals_view, NULL);
-  ide_debugger_registers_view_set_debugger (self->registers_view, NULL);
-  ide_debugger_threads_view_set_debugger (self->threads_view, NULL);
+  if (self->breakpoints_view)
+    ide_debugger_breakpoints_view_set_debugger (self->breakpoints_view, NULL);
+
+  if (self->libraries_view)
+    ide_debugger_libraries_view_set_debugger (self->libraries_view, NULL);
+
+  if (self->locals_view)
+    ide_debugger_locals_view_set_debugger (self->locals_view, NULL);
+
+  if (self->registers_view)
+    ide_debugger_registers_view_set_debugger (self->registers_view, NULL);
+
+  if (self->threads_view)
+    ide_debugger_threads_view_set_debugger (self->threads_view, NULL);
 
   IDE_EXIT;
 }
diff --git a/libide/debugger/ide-debugger-perspective.ui b/libide/debugger/ide-debugger-perspective.ui
index 67f676a..d6407b8 100644
--- a/libide/debugger/ide-debugger-perspective.ui
+++ b/libide/debugger/ide-debugger-perspective.ui
@@ -13,17 +13,11 @@
     </child>
     <child type="bottom">
       <object class="DzlDockStack">
+        <property name="height-request">100</property>
         <property name="hexpand">true</property>
         <property name="visible">true</property>
         <child>
           <object class="DzlDockWidget">
-            <property name="title" translatable="yes">Application Output</property>
-            <property name="expand">true</property>
-            <property name="visible">true</property>
-          </object>
-        </child>
-        <child>
-          <object class="DzlDockWidget">
             <property name="title" translatable="yes">Breakpoints</property>
             <property name="expand">true</property>
             <property name="visible">true</property>
diff --git a/plugins/gdb/gbp-gdb-debugger.c b/plugins/gdb/gbp-gdb-debugger.c
index b2f0de8..594e919 100644
--- a/plugins/gdb/gbp-gdb-debugger.c
+++ b/plugins/gdb/gbp-gdb-debugger.c
@@ -2140,7 +2140,9 @@ gbp_gdb_debugger_disassemble_async (IdeDebugger                   *debugger,
   g_task_set_priority (task, G_PRIORITY_LOW);
   g_task_set_source_tag (task, gbp_gdb_debugger_disassemble_async);
 
-  command = g_strdup_printf ("-data-disassemble -s 0x%"G_GINT64_MODIFIER"x -e 0x%"G_GINT64_MODIFIER"x 0",
+  command = g_strdup_printf ("-data-disassemble "
+                             "-s 0x%"G_GINT64_MODIFIER"x "
+                             "-e 0x%"G_GINT64_MODIFIER"x 0",
                              range->from, range->to);
 
   gbp_gdb_debugger_exec_async (self,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]