aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi/mi-cmd-var.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2010-05-17 20:49:39 +0000
committerMichael Snyder <msnyder@vmware.com>2010-05-17 20:49:39 +0000
commit102040f0d08b06980adf402c17b2f039fee7d23c (patch)
treeef6558f84010ba8af6ee46b4cfddc6d5d24b5752 /gdb/mi/mi-cmd-var.c
parentcdb27c12f30352674694895e06f615fd28ebdbec (diff)
downloadgdb-102040f0d08b06980adf402c17b2f039fee7d23c.zip
gdb-102040f0d08b06980adf402c17b2f039fee7d23c.tar.gz
gdb-102040f0d08b06980adf402c17b2f039fee7d23c.tar.bz2
2010-05-17 Michael Snyder <msnyder@vmware.com>
* mi/mi-cmd-break.c: White space. * mi/mi-cmd-env.c: White space. * mi/mi-cmds.c: White space. * mi/mi-cmd-stack.c: White space. * mi/mi-cmd-var.c: White space. * mi/mi-console.c: White space. * mi/mi-getopt.c: White space. * mi/mi-interp.c: White space. * mi/mi-main.c: White space. * mi/mi-out.c: White space. * mi/mi-parse.c: White space.
Diffstat (limited to 'gdb/mi/mi-cmd-var.c')
-rw-r--r--gdb/mi/mi-cmd-var.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c
index 023bbb5..310ade9 100644
--- a/gdb/mi/mi-cmd-var.c
+++ b/gdb/mi/mi-cmd-var.c
@@ -62,6 +62,7 @@ print_varobj (struct varobj *var, enum print_values print_values,
if (mi_print_value_p (var, print_values))
{
char *val = varobj_get_value (var);
+
ui_out_field_string (uiout, "value", val);
xfree (val);
}
@@ -435,6 +436,7 @@ mi_cmd_var_list_children (char *command, char **argv, int argc)
if (from < to)
{
struct cleanup *cleanup_children;
+
if (mi_version (uiout) == 1)
cleanup_children
= make_cleanup_ui_out_tuple_begin_end (uiout, "children");
@@ -446,6 +448,7 @@ mi_cmd_var_list_children (char *command, char **argv, int argc)
++ix)
{
struct cleanup *cleanup_child;
+
cleanup_child = make_cleanup_ui_out_tuple_begin_end (uiout, "child");
print_varobj (child, print_values, 1 /* print expression */);
do_cleanups (cleanup_child);
@@ -554,7 +557,9 @@ mi_cmd_var_evaluate_expression (char *command, char **argv, int argc)
optind = 0;
while (1)
{
- int opt = mi_getopt ("-var-evaluate-expression", argc, argv, opts, &optind, &optarg);
+ int opt = mi_getopt ("-var-evaluate-expression", argc, argv,
+ opts, &optind, &optarg);
+
if (opt < 0)
break;
switch ((enum opt) opt)
@@ -581,12 +586,14 @@ mi_cmd_var_evaluate_expression (char *command, char **argv, int argc)
if (formatFound)
{
char *val = varobj_get_formatted_value (var, format);
+
ui_out_field_string (uiout, "value", val);
xfree (val);
}
else
{
char *val = varobj_get_value (var);
+
ui_out_field_string (uiout, "value", val);
xfree (val);
}
@@ -732,6 +739,7 @@ varobj_update_one (struct varobj *var, enum print_values print_values,
if (mi_print_value_p (r->varobj, print_values))
{
char *val = varobj_get_value (r->varobj);
+
ui_out_field_string (uiout, "value", val);
xfree (val);
}
@@ -784,6 +792,7 @@ varobj_update_one (struct varobj *var, enum print_values print_values,
for (j = 0; VEC_iterate (varobj_p, r->new, j, child); ++j)
{
struct cleanup *cleanup_child;
+
cleanup_child = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
print_varobj (child, print_values, 1 /* print_expression */);
do_cleanups (cleanup_child);