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:
parent
5b8a477608
commit
a739972c7c
@ -1,3 +1,14 @@
|
||||
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.
|
||||
|
||||
2020-09-28 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* target.c (target_has_all_memory_1): Remove.
|
||||
|
@ -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. */
|
||||
|
@ -170,7 +170,7 @@ show_targetdebug (struct ui_file *file, int from_tty,
|
||||
}
|
||||
|
||||
int
|
||||
target_has_memory_1 (void)
|
||||
target_has_memory ()
|
||||
{
|
||||
for (target_ops *t = current_top_target (); t != NULL; t = t->beneath ())
|
||||
if (t->has_memory ())
|
||||
|
@ -1812,8 +1812,7 @@ extern void default_target_pass_ctrlc (struct target_ops *ops);
|
||||
|
||||
/* Does the target include memory? (Dummy targets don't.) */
|
||||
|
||||
extern int target_has_memory_1 (void);
|
||||
#define target_has_memory target_has_memory_1 ()
|
||||
extern int target_has_memory ();
|
||||
|
||||
/* Does the target have a stack? (Exec files don't, VxWorks doesn't, until
|
||||
we start a process.) */
|
||||
|
@ -1407,7 +1407,7 @@ scoped_restore_current_thread::restore ()
|
||||
&& m_thread->state == THREAD_STOPPED
|
||||
&& target_has_registers
|
||||
&& target_has_stack
|
||||
&& target_has_memory)
|
||||
&& target_has_memory ())
|
||||
restore_selected_frame (m_selected_frame_id, m_selected_frame_level);
|
||||
}
|
||||
|
||||
@ -1441,7 +1441,7 @@ scoped_restore_current_thread::scoped_restore_current_thread ()
|
||||
if (m_was_stopped
|
||||
&& target_has_registers
|
||||
&& target_has_stack
|
||||
&& target_has_memory)
|
||||
&& target_has_memory ())
|
||||
{
|
||||
/* When processing internal events, there might not be a
|
||||
selected frame. If we naively call get_selected_frame
|
||||
|
@ -182,7 +182,7 @@ tui_data_window::show_registers (struct reggroup *group)
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user