/* Implementation of the GDB variable objects API.
- Copyright (C) 1999-2021 Free Software Foundation, Inc.
+ Copyright (C) 1999-2022 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "gdbcmd.h"
#include "block.h"
#include "valprint.h"
-#include "gdb_regex.h"
+#include "gdbsupport/gdb_regex.h"
#include "varobj.h"
#include "gdbthread.h"
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. */
|| 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;
}
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))
{
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);
/* 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. */
/* All other cases. */
common_val_print (value, &stb, 0, &opts, current_language);
- return std::move (stb.string ());
+ return stb.release ();
}
bool