error (_("'%s' is a pseudo-register; "
"GDB cannot yet trace its contents."),
user_reg_map_regnum_to_name (x->gdbarch, reg));
- if (gdbarch_ax_pseudo_register_push_stack (x->gdbarch, x, reg))
+
+ if (!gdbarch_ax_pseudo_register_push_stack (x->gdbarch, x, reg))
error (_("Trace '%s' failed."),
user_reg_map_regnum_to_name (x->gdbarch, reg));
}
return gdbarch->ax_pseudo_register_push_stack != NULL;
}
-int
+bool
gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
{
gdb_assert (gdbarch != NULL);
/* Assemble agent expression bytecode to push the value of pseudo-register
REG on the interpreter stack.
- Return -1 if something goes wrong, 0 otherwise. */
+ REG must be a valid register number.
+ Return false if something goes wrong, true otherwise. */
extern bool gdbarch_ax_pseudo_register_push_stack_p (struct gdbarch *gdbarch);
-typedef int (gdbarch_ax_pseudo_register_push_stack_ftype) (struct gdbarch *gdbarch, struct agent_expr *ax, int reg);
-extern int gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, struct agent_expr *ax, int reg);
+typedef bool (gdbarch_ax_pseudo_register_push_stack_ftype) (struct gdbarch *gdbarch, struct agent_expr *ax, int reg);
+extern bool gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, struct agent_expr *ax, int reg);
extern void set_gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, gdbarch_ax_pseudo_register_push_stack_ftype *ax_pseudo_register_push_stack);
/* Some architectures can display additional information for specific
comment="""
Assemble agent expression bytecode to push the value of pseudo-register
REG on the interpreter stack.
-Return -1 if something goes wrong, 0 otherwise.
+REG must be a valid register number.
+Return false if something goes wrong, true otherwise.
""",
- type="int",
+ type="bool",
name="ax_pseudo_register_push_stack",
params=[("struct agent_expr *", "ax"), ("int", "reg")],
predicate=True,
ax_reg_mask (ax, rawnum);
}
-static int
+static bool
mips_ax_pseudo_register_push_stack (struct gdbarch *gdbarch,
struct agent_expr *ax, int reg)
{
else
internal_error (_("bad register size"));
- return 0;
+ return true;
}
/* Table to translate 3-bit register field to actual register number. */
/* The "ax_pseudo_register_push_stack" gdbarch method. */
-static int
+static bool
s390_ax_pseudo_register_push_stack (struct gdbarch *gdbarch,
struct agent_expr *ax, int regnum)
{
else if (regnum_is_vxr_full (tdep, regnum))
{
/* Too large to stuff on the stack. */
- return 1;
+ return false;
}
else
{
internal_error (_("invalid regnum"));
}
- return 0;
+ return true;
}
/* The "gen_return_address" gdbarch method. Since this is supposed to be