* c-valprint.c (c_value_print): Fix up some formatting. Use
[deliverable/binutils-gdb.git] / gdb / varobj.c
index c86e38ce2a8791f78908f932391093b048c4f906..23c2a51df7204417ae248192e0e202449be8ac49 100644 (file)
 /* Non-zero if we want to see trace of varobj level stuff.  */
 
 int varobjdebug = 0;
+static void
+show_varobjdebug (struct ui_file *file, int from_tty,
+                 struct cmd_list_element *c, const char *value)
+{
+  fprintf_filtered (file, _("Varobj debugging is %s.\n"), value);
+}
 
 /* String representations of gdb's format codes */
 char *varobj_format_string[] =
@@ -1444,7 +1450,7 @@ variable_default_display (struct varobj *var)
    can't be established, *ERROR2 is set to non-zero.  */
 
 static int
-my_value_equal (struct value *val1, struct value *val2, int *error2)
+my_value_equal (struct value *val1, struct value *volatile val2, int *error2)
 {
   volatile struct exception except;
 
@@ -2074,10 +2080,8 @@ c_value_of_variable (struct varobj *var)
 
            if (value_lazy (var->value))
              gdb_value_fetch_lazy (var->value);
-           val_print (value_type (var->value),
-                      value_contents_raw (var->value), 0,
-                      VALUE_ADDRESS (var->value), stb,
-                      format_code[(int) var->format], 1, 0, 0);
+           common_val_print (var->value, stb,
+                             format_code[(int) var->format], 1, 0, 0);
            thevalue = ui_file_xstrdup (stb, &dummy);
            do_cleanups (old_chain);
        return thevalue;
@@ -2545,6 +2549,6 @@ Set varobj debugging."), _("\
 Show varobj debugging."), _("\
 When non-zero, varobj debugging is enabled."),
                            NULL,
-                           NULL, /* FIXME: i18n: */
+                           show_varobjdebug,
                            &setlist, &showlist);
 }
This page took 0.025328 seconds and 4 git commands to generate.