diff options
author | Vladimir Prus <vladimir@codesourcery.com> | 2008-07-13 05:31:44 +0000 |
---|---|---|
committer | Vladimir Prus <vladimir@codesourcery.com> | 2008-07-13 05:31:44 +0000 |
commit | dbba82516a0ef15996744aff2bd7bbd19ee96a12 (patch) | |
tree | 62157a14f86a89a3ef4a34ebfc500389098bb1b9 /gdb/mi | |
parent | e3d6cd5f43da96f88c0440a3d843f11f499e74e5 (diff) | |
download | gdb-dbba82516a0ef15996744aff2bd7bbd19ee96a12.zip gdb-dbba82516a0ef15996744aff2bd7bbd19ee96a12.tar.gz gdb-dbba82516a0ef15996744aff2bd7bbd19ee96a12.tar.bz2 |
Skip varobj in running threads.
* mi/mi-cmd-var.c (mi_cmd_var_update): If varobj's
thread is not stopped, skip the varobj.
* Makefile.in: Update dependencies.
Diffstat (limited to 'gdb/mi')
-rw-r--r-- | gdb/mi/mi-cmd-var.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c index 0adcf1f..53c95da 100644 --- a/gdb/mi/mi-cmd-var.c +++ b/gdb/mi/mi-cmd-var.c @@ -29,6 +29,7 @@ #include <ctype.h> #include "gdb_string.h" #include "mi-getopt.h" +#include "gdbthread.h" const char mi_no_values[] = "--no-values"; const char mi_simple_values[] = "--simple-values"; @@ -610,8 +611,21 @@ mi_cmd_var_update (char *command, char **argv, int argc) cr = rootlist; while (*cr != NULL) { - if (*name == '*' || varobj_floating_p (*cr)) - varobj_update_one (*cr, print_values, 0 /* implicit */); + int thread_id = varobj_get_thread_id (*cr); + int thread_stopped = 0; + if (thread_id == -1 && is_stopped (inferior_ptid)) + thread_stopped = 1; + else + { + struct thread_info *tp = find_thread_id (thread_id); + if (tp) + thread_stopped = is_stopped (tp->ptid); + else + thread_stopped = 1; + } + if (thread_stopped) + if (*name == '*' || varobj_floating_p (*cr)) + varobj_update_one (*cr, print_values, 0 /* implicit */); cr++; } do_cleanups (cleanup); |