Convert break-catch-syscall to vtable ops
[binutils-gdb.git] / gdb / varobj.c
index b59ddc1e772f2ec3f3b60b489ea15ac3f41daa8a..741fdb6a03b16c75c574455d41e98165bf44b6df 100644 (file)
@@ -23,7 +23,7 @@
 #include "gdbcmd.h"
 #include "block.h"
 #include "valprint.h"
-#include "gdb_regex.h"
+#include "gdbsupport/gdb_regex.h"
 
 #include "varobj.h"
 #include "gdbthread.h"
@@ -47,7 +47,7 @@ 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);
+  gdb_printf (file, _("Varobj debugging is %s.\n"), value);
 }
 
 /* String representations of gdb's format codes.  */
@@ -316,8 +316,8 @@ varobj_create (const char *objname,
          || opcode == OP_TYPEOF
          || opcode == OP_DECLTYPE)
        {
-         fprintf_unfiltered (gdb_stderr, "Attempt to use a type name"
-                             " as an expression.\n");
+         gdb_printf (gdb_stderr, "Attempt to use a type name"
+                     " as an expression.\n");
          return NULL;
        }
 
@@ -1755,7 +1755,7 @@ uninstall_variable (struct varobj *var)
   htab_remove_elt_with_hash (varobj_table, var->obj_name.c_str (), hash);
 
   if (varobjdebug)
-    fprintf_unfiltered (gdb_stdlog, "Deleting %s\n", var->obj_name.c_str ());
+    gdb_printf (gdb_stdlog, "Deleting %s\n", var->obj_name.c_str ());
 
   /* If root, remove varobj from root list.  */
   if (is_root_p (var))
@@ -1939,8 +1939,8 @@ check_scope (const struct varobj *var)
     {
       CORE_ADDR pc = get_frame_pc (fi);
 
-      if (pc <  BLOCK_START (var->root->valid_block) ||
-         pc >= BLOCK_END (var->root->valid_block))
+      if (pc <  var->root->valid_block->start () ||
+         pc >= var->root->valid_block->end ())
        scope = false;
       else
        select_frame (fi);
@@ -2232,8 +2232,8 @@ varobj_value_get_print_value (struct value *value,
 
   /* If the THEVALUE has contents, it is a regular string.  */
   if (!thevalue.empty ())
-    LA_PRINT_STRING (&stb, type, (gdb_byte *) thevalue.c_str (),
-                    len, encoding.get (), 0, &opts);
+    current_language->printstr (&stb, type, (gdb_byte *) thevalue.c_str (),
+                               len, encoding.get (), 0, &opts);
   else if (string_print)
     /* Otherwise, if string_print is set, and it is not a regular
        string, it is a lazy string.  */
@@ -2242,7 +2242,7 @@ varobj_value_get_print_value (struct value *value,
     /* All other cases.  */
     common_val_print (value, &stb, 0, &opts, current_language);
 
-  return std::move (stb.string ());
+  return stb.release ();
 }
 
 bool