[gnome-builder] gdb: use --thread during stack-list-frames



commit dec263460b346b4f24480add16f8e9abb1e5017d
Author: Simone Piccardi <simone piccardi gmail com>
Date:   Wed Jan 16 13:49:10 2019 +0100

    gdb: use --thread during stack-list-frames

 src/plugins/gdb/gbp-gdb-debugger.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/gdb/gbp-gdb-debugger.c b/src/plugins/gdb/gbp-gdb-debugger.c
index f222fff7c..daf0ffe54 100644
--- a/src/plugins/gdb/gbp-gdb-debugger.c
+++ b/src/plugins/gdb/gbp-gdb-debugger.c
@@ -1643,6 +1643,8 @@ gbp_gdb_debugger_list_frames_async (IdeDebugger         *debugger,
 {
   GbpGdbDebugger *self = (GbpGdbDebugger *)debugger;
   g_autoptr(IdeTask) task = NULL;
+  g_autofree gchar *command = NULL;
+  const gchar *tid = NULL;
 
   g_assert (GBP_IS_GDB_DEBUGGER (self));
   g_assert (IDE_DEBUGGER_THREAD (thread));
@@ -1656,9 +1658,12 @@ gbp_gdb_debugger_list_frames_async (IdeDebugger         *debugger,
    *       the appropriate thread is selected first.
    */
 
+  tid = ide_debugger_thread_get_id (thread);
+  command = g_strdup_printf ("-stack-list-frames --thread %s", tid);
+
   gbp_gdb_debugger_exec_async (self,
-                               thread,
-                               "-stack-list-frames",
+                               NULL,
+                               command,
                                cancellable,
                                gbp_gdb_debugger_list_frames_cb,
                                g_steal_pointer (&task));


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