[gnome-builder/gnome-builder-3-30] gdb: use --thread and --frame during stack-list-variables
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/gnome-builder-3-30] gdb: use --thread and --frame during stack-list-variables
- Date: Sat, 12 Jan 2019 02:42:56 +0000 (UTC)
commit a3d3bc6e99385c204a1d27f60c9c486d1a6f7c2a
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 670e4f11b..9dd5a0b81 100644
--- a/src/plugins/gdb/gbp-gdb-debugger.c
+++ b/src/plugins/gdb/gbp-gdb-debugger.c
@@ -1984,6 +1984,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));
@@ -1994,14 +1995,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]