+2020-09-28 Tom Tromey <tom@tromey.com>
+
+ * mi/mi-main.c (exec_reverse_continue)
+ (mi_cmd_list_target_features): Update.
+ * infrun.c (set_exec_direction_func): Update.
+ * target.c (default_execution_direction): Update.
+ * reverse.c (exec_reverse_once): Update.
+ * target.h (target_can_execute_reverse): Now a function.
+
2020-09-28 Tom Tromey <tom@tromey.com>
* tui/tui-regs.c (tui_get_register)
set_exec_direction_func (const char *args, int from_tty,
struct cmd_list_element *cmd)
{
- if (target_can_execute_reverse)
+ if (target_can_execute_reverse ())
{
if (!strcmp (exec_direction, exec_forward))
execution_direction = EXEC_FORWARD;
if (dir == EXEC_REVERSE)
error (_("Already in reverse mode."));
- if (!target_can_execute_reverse)
+ if (!target_can_execute_reverse ())
error (_("Target %s does not support this command."), target_shortname);
scoped_restore save_exec_dir = make_scoped_restore (&execution_direction,
ui_out_emit_list list_emitter (uiout, "features");
if (mi_async_p ())
uiout->field_string (NULL, "async");
- if (target_can_execute_reverse)
+ if (target_can_execute_reverse ())
uiout->field_string (NULL, "reverse");
return;
}
error (_("Already in reverse mode. Use '%s' or 'set exec-dir forward'."),
cmd);
- if (!target_can_execute_reverse)
+ if (!target_can_execute_reverse ())
error (_("Target %s does not support this command."), target_shortname);
std::string reverse_command = string_printf ("%s %s", cmd, args ? args : "");
static enum exec_direction_kind
default_execution_direction (struct target_ops *self)
{
- if (!target_can_execute_reverse)
+ if (!target_can_execute_reverse ())
return EXEC_FORWARD;
else if (!target_can_async_p ())
return EXEC_FORWARD;
extern int target_masked_watch_num_registers (CORE_ADDR addr, CORE_ADDR mask);
/* Target can execute in reverse? */
-#define target_can_execute_reverse \
- current_top_target ()->can_execute_reverse ()
+static inline bool
+target_can_execute_reverse ()
+{
+ return current_top_target ()->can_execute_reverse ();
+}
extern const struct target_desc *target_read_description (struct target_ops *);