aboutsummaryrefslogtreecommitdiff
path: root/gdb/varobj.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2009-04-10 15:57:54 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2009-04-10 15:57:54 +0000
commit2dbd25e5ebb6a3aee5b2e0054d94c8c684de2fd2 (patch)
tree429116c34e72698afb2aa01a4afe9e6ff8985a7c /gdb/varobj.c
parentc16abbdefa03efac06d87fe181e86396cb915886 (diff)
downloadgdb-2dbd25e5ebb6a3aee5b2e0054d94c8c684de2fd2.zip
gdb-2dbd25e5ebb6a3aee5b2e0054d94c8c684de2fd2.tar.gz
gdb-2dbd25e5ebb6a3aee5b2e0054d94c8c684de2fd2.tar.bz2
gdb/
* varobj.c (varobj_invalidate): Fix indentation.
Diffstat (limited to 'gdb/varobj.c')
-rw-r--r--gdb/varobj.c65
1 files changed, 33 insertions, 32 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 0147ecb..ecd6f85 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -2751,6 +2751,7 @@ When non-zero, varobj debugging is enabled."),
/* Invalidate the varobjs that are tied to locals and re-create the ones that
are defined on globals.
Invalidated varobjs will be always printed in_scope="invalid". */
+
void
varobj_invalidate (void)
{
@@ -2758,38 +2759,38 @@ varobj_invalidate (void)
struct varobj **varp;
if (varobj_list (&all_rootvarobj) > 0)
- {
- varp = all_rootvarobj;
- while (*varp != NULL)
- {
- /* Floating varobjs are reparsed on each stop, so we don't care if
- the presently parsed expression refers to something that's gone. */
- if ((*varp)->root->floating)
- continue;
-
- /* global var must be re-evaluated. */
- if ((*varp)->root->valid_block == NULL)
- {
- struct varobj *tmp_var;
-
- /* Try to create a varobj with same expression. If we succeed replace
- the old varobj, otherwise invalidate it. */
- tmp_var = varobj_create (NULL, (*varp)->name, (CORE_ADDR) 0, USE_CURRENT_FRAME);
- if (tmp_var != NULL)
- {
- tmp_var->obj_name = xstrdup ((*varp)->obj_name);
- varobj_delete (*varp, NULL, 0);
- install_variable (tmp_var);
- }
- else
- (*varp)->root->is_valid = 0;
- }
- else /* locals must be invalidated. */
- (*varp)->root->is_valid = 0;
-
- varp++;
- }
- }
+ {
+ varp = all_rootvarobj;
+ while (*varp != NULL)
+ {
+ /* Floating varobjs are reparsed on each stop, so we don't care if
+ the presently parsed expression refers to something that's gone. */
+ if ((*varp)->root->floating)
+ continue;
+
+ /* global var must be re-evaluated. */
+ if ((*varp)->root->valid_block == NULL)
+ {
+ struct varobj *tmp_var;
+
+ /* Try to create a varobj with same expression. If we succeed replace
+ the old varobj, otherwise invalidate it. */
+ tmp_var = varobj_create (NULL, (*varp)->name, (CORE_ADDR) 0, USE_CURRENT_FRAME);
+ if (tmp_var != NULL)
+ {
+ tmp_var->obj_name = xstrdup ((*varp)->obj_name);
+ varobj_delete (*varp, NULL, 0);
+ install_variable (tmp_var);
+ }
+ else
+ (*varp)->root->is_valid = 0;
+ }
+ else /* locals must be invalidated. */
+ (*varp)->root->is_valid = 0;
+
+ varp++;
+ }
+ }
xfree (all_rootvarobj);
return;
}