+2020-09-28 Tom Tromey <tom@tromey.com>
+
+ * tui/tui-regs.c (tui_get_register)
+ (tui_data_window::show_registers): Update.
+ * thread.c (scoped_restore_current_thread::restore)
+ (scoped_restore_current_thread::scoped_restore_current_thread):
+ Update.
+ * regcache-dump.c (regcache_print): Update.
+ * python/py-finishbreakpoint.c (bpfinishpy_detect_out_scope_cb):
+ Update.
+ * mi/mi-main.c (mi_cmd_data_write_register_values): Update.
+ * mep-tdep.c (current_me_module, current_options): Update.
+ * linux-thread-db.c (thread_db_load): Update.
+ * infcmd.c (registers_info, info_vector_command)
+ (info_float_command): Update.
+ * ia64-tdep.c (ia64_frame_prev_register)
+ (ia64_sigtramp_frame_prev_register): Update.
+ * ia64-libunwind-tdep.c (libunwind_frame_prev_register): Update.
+ * gcore.c (derive_stack_segment): Update.
+ * frame.c (get_current_frame, has_stack_frames): Update.
+ * findvar.c (language_defn::read_var_value): Update.
+ * arm-tdep.c (arm_pc_is_thumb): Update.
+ * target.c (target_has_registers): Rename from
+ target_has_registers_1.
+ * target.h (target_has_registers): Remove macro.
+ (target_has_registers): Rename from target_has_registers_1.
+
2020-09-28 Tom Tromey <tom@tromey.com>
* windows-tdep.c (tlb_make_value): Update.
"display/i $pc" always show the correct mode (though if there is
a symbol table we will not reach here, so it still may not be
displayed in the mode it will be executed). */
- if (target_has_registers)
+ if (target_has_registers ())
return arm_frame_is_thumb (get_current_frame ());
/* Otherwise we're out of luck; we assume ARM. */
sym_need = symbol_read_needs (var);
if (sym_need == SYMBOL_NEEDS_FRAME)
gdb_assert (frame != NULL);
- else if (sym_need == SYMBOL_NEEDS_REGISTERS && !target_has_registers)
+ else if (sym_need == SYMBOL_NEEDS_REGISTERS && !target_has_registers ())
error (_("Cannot read `%s' without registers"), var->print_name ());
if (frame != NULL)
have registers is very confusing. Besides, "printcmd.exp"
explicitly checks that ``print $pc'' with no registers prints "No
registers". */
- if (!target_has_registers)
+ if (!target_has_registers ())
error (_("No registers."));
if (!target_has_stack ())
error (_("No stack."));
bool
has_stack_frames ()
{
- if (!target_has_registers || !target_has_stack () || !target_has_memory ())
+ if (!target_has_registers () || !target_has_stack ()
+ || !target_has_memory ())
return false;
/* Traceframes are effectively a substitute for the live inferior. */
gdb_assert (top);
/* Can't succeed without stack and registers. */
- if (!target_has_stack () || !target_has_registers)
+ if (!target_has_stack () || !target_has_registers ())
return 0;
/* Can't succeed without current frame. */
gdb_assert (regnum >= 0);
- if (!target_has_registers)
+ if (!target_has_registers ())
error (_("No registers."));
if (uw_regnum < 0)
gdb_assert (regnum >= 0);
- if (!target_has_registers)
+ if (!target_has_registers ())
error (_("No registers."));
if (regnum == gdbarch_sp_regnum (gdbarch))
gdb_assert (regnum >= 0);
- if (!target_has_registers)
+ if (!target_has_registers ())
error (_("No registers."));
if (regnum == IA64_IP_REGNUM)
struct frame_info *frame;
struct gdbarch *gdbarch;
- if (!target_has_registers)
+ if (!target_has_registers ())
error (_("The program has no registers now."));
frame = get_selected_frame (NULL);
gdbarch = get_frame_arch (frame);
static void
info_vector_command (const char *args, int from_tty)
{
- if (!target_has_registers)
+ if (!target_has_registers ())
error (_("The program has no registers now."));
print_vector_info (gdb_stdout, get_selected_frame (NULL), args);
{
struct frame_info *frame;
- if (!target_has_registers)
+ if (!target_has_registers ())
error (_("The program has no registers now."));
frame = get_selected_frame (NULL);
/* Don't attempt to use thread_db on executables not running
yet. */
- if (!target_has_registers)
+ if (!target_has_registers ())
return false;
/* Don't attempt to use thread_db for remote targets. */
static CONFIG_ATTR
current_me_module (void)
{
- if (target_has_registers)
+ if (target_has_registers ())
{
ULONGEST regval;
regcache_cooked_read_unsigned (get_current_regcache (),
static unsigned int
current_options (void)
{
- if (target_has_registers)
+ if (target_has_registers ())
{
ULONGEST regval;
regcache_cooked_read_unsigned (get_current_regcache (),
error (_("-data-write-register-values: Usage: -data-write-register-"
"values <format> [<regnum1> <value1>...<regnumN> <valueN>]"));
- if (!target_has_registers)
+ if (!target_has_registers ())
error (_("-data-write-register-values: No registers."));
if (!(argc - 1))
try
{
if (b->pspace == current_inferior ()->pspace
- && (!target_has_registers
+ && (!target_has_registers ()
|| frame_find_by_id (b->frame_id) == NULL))
bpfinishpy_out_of_scope (finish_bp);
}
std::unique_ptr<regcache> regs;
gdbarch *gdbarch;
- if (target_has_registers)
+ if (target_has_registers ())
gdbarch = get_current_regcache ()->arch ();
else
gdbarch = target_gdbarch ();
{
auto dump_pseudo = (what_to_dump == regcache_dump_cooked);
- if (target_has_registers)
+ if (target_has_registers ())
dump.reset (new register_dump_regcache (get_current_regcache (),
dump_pseudo));
else
}
int
-target_has_registers_1 (void)
+target_has_registers ()
{
for (target_ops *t = current_top_target (); t != NULL; t = t->beneath ())
if (t->has_registers ())
/* Does the target have registers? (Exec files don't.) */
-extern int target_has_registers_1 (void);
-#define target_has_registers target_has_registers_1 ()
+extern int target_has_registers ();
/* Does the target have execution? Can we make it jump (through
hoops), or pop its stack a few times? This means that the current
if (inferior_ptid != null_ptid
&& m_was_stopped
&& m_thread->state == THREAD_STOPPED
- && target_has_registers
+ && target_has_registers ()
&& target_has_stack ()
&& target_has_memory ())
restore_selected_frame (m_selected_frame_id, m_selected_frame_level);
m_was_stopped = m_thread->state == THREAD_STOPPED;
if (m_was_stopped
- && target_has_registers
+ && target_has_registers ()
&& target_has_stack ()
&& target_has_memory ())
{
{
if (changedp)
*changedp = false;
- if (target_has_registers)
+ if (target_has_registers ())
{
std::string new_content = tui_register_format (frame, regnum);
if (group == 0)
group = general_reggroup;
- if (target_has_registers && target_has_stack () && target_has_memory ())
+ if (target_has_registers () && target_has_stack () && target_has_memory ())
{
show_register_group (group, get_selected_frame (NULL),
group == m_current_group);