aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2008-03-24 17:33:30 +0000
committerVladimir Prus <vladimir@codesourcery.com>2008-03-24 17:33:30 +0000
commitc5b48eacfa0f8cade0bf4a11729509e833bcff63 (patch)
tree33c26955a6e57f8e34cca75d9ab45248fa138f04 /gdb/mi
parent9df503519c0e9925a677792a152d958de18d6bb5 (diff)
downloadgdb-c5b48eacfa0f8cade0bf4a11729509e833bcff63.zip
gdb-c5b48eacfa0f8cade0bf4a11729509e833bcff63.tar.gz
gdb-c5b48eacfa0f8cade0bf4a11729509e833bcff63.tar.bz2
* varobj.c (struct varobj_root): New component thread_id.
(varobj_get_thread_id, check_scope): New functions. (c_value_of_root): Use check_scope. Switch to the proper thread if necessary. * varobj.h (varobj_get_thread_id): New extern. * mi/mi-cmd-var.c (print_varobj): Add thread-id field.
Diffstat (limited to 'gdb/mi')
-rw-r--r--gdb/mi/mi-cmd-var.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c
index 7dfa1f0..dc873ca 100644
--- a/gdb/mi/mi-cmd-var.c
+++ b/gdb/mi/mi-cmd-var.c
@@ -50,6 +50,7 @@ print_varobj (struct varobj *var, enum print_values print_values,
{
struct type *gdb_type;
char *type;
+ int thread_id;
ui_out_field_string (uiout, "name", varobj_get_objname (var));
if (print_expression)
@@ -66,6 +67,10 @@ print_varobj (struct varobj *var, enum print_values print_values,
xfree (type);
}
+ thread_id = varobj_get_thread_id (var);
+ if (thread_id > 0)
+ ui_out_field_int (uiout, "thread-id", thread_id);
+
if (varobj_get_frozen (var))
ui_out_field_int (uiout, "frozen", 1);
}