Remove target_has_memory macro

This removes the target_has_memory object-like macro, replacing it
with the underlying function.

gdb/ChangeLog
2020-09-28  Tom Tromey  <tom@tromey.com>

	* target.c (target_has_memory): Rename from target_has_memory_1.
	* tui/tui-regs.c (tui_data_window::show_registers): Update.
	* thread.c (scoped_restore_current_thread::restore)
	(scoped_restore_current_thread::scoped_restore_current_thread):
	Update.
	* frame.c (get_current_frame, has_stack_frames): Update.
	* target.h (target_has_memory): Remove macro.
	(target_has_memory): Rename from target_has_memory_1.
This commit is contained in:
Tom Tromey
2020-09-28 19:38:25 -06:00
parent 5b8a477608
commit a739972c7c
6 changed files with 18 additions and 8 deletions

View File

@ -1657,7 +1657,7 @@ get_current_frame (void)
error (_("No registers."));
if (!target_has_stack)
error (_("No stack."));
if (!target_has_memory)
if (!target_has_memory ())
error (_("No memory."));
/* Traceframes are effectively a substitute for the live inferior. */
if (get_traceframe_number () < 0)
@ -1692,7 +1692,7 @@ static struct frame_info *selected_frame;
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. */