[gnome-builder] gdb: use --thread and --frame during stack-list-variables



commit 1eec54342e9195434524d7e574061b25b0d2c39e
Author: Christian Hergert <chergert redhat com>
Date:   Fri Jan 11 18:38:55 2019 -0800

    gdb: use --thread and --frame during stack-list-variables
    
    This uses a simpler form to list locals for a given frame without having
    to first switch thread or selected frame.
    
    Patch provided by Simo in #748

 src/plugins/gdb/gbp-gdb-debugger.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/plugins/gdb/gbp-gdb-debugger.c b/src/plugins/gdb/gbp-gdb-debugger.c
index e73699dcc..1a873101c 100644
--- a/src/plugins/gdb/gbp-gdb-debugger.c
+++ b/src/plugins/gdb/gbp-gdb-debugger.c
@@ -1990,6 +1990,7 @@ gbp_gdb_debugger_list_locals_async (IdeDebugger         *debugger,
   g_autoptr(IdeTask) task = NULL;
   g_autofree gchar *command = NULL;
   guint depth;
+  const gchar *tid = NULL;
 
   g_assert (GBP_IS_GDB_DEBUGGER (self));
   g_assert (IDE_IS_DEBUGGER_THREAD (thread));
@@ -2000,14 +2001,13 @@ gbp_gdb_debugger_list_locals_async (IdeDebugger         *debugger,
   ide_task_set_priority (task, G_PRIORITY_LOW);
   ide_task_set_source_tag (task, gbp_gdb_debugger_list_locals_async);
 
+  tid = ide_debugger_thread_get_id (thread);
   depth = ide_debugger_frame_get_depth (frame);
-  command = g_strdup_printf ("9999-stack-select-frame %u\n"
-                             "@@@@-stack-list-locals --simple-values\n"
-                             "9999-stack-select-frame",
-                             depth);
+  command = g_strdup_printf ("@@@@-stack-list-variables --thread %s --frame %u --simple-values\n",
+                             tid, depth);
 
   gbp_gdb_debugger_exec_async (self,
-                               thread,
+                               NULL,
                                command,
                                cancellable,
                                gbp_gdb_debugger_list_locals_cb,


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