/* Implementation of `gdbarch_stap_is_single_operand', as defined in
gdbarch.h. */
-static int
+static bool
aarch64_stap_is_single_operand (struct gdbarch *gdbarch, const char *s)
{
return (*s == '#' || c_isdigit (*s) /* Literal number. */
/* Implementation of `gdbarch_stap_is_single_operand', as defined in
gdbarch.h. */
-static int
+static bool
arm_stap_is_single_operand (struct gdbarch *gdbarch, const char *s)
{
return (*s == '#' || *s == '$' || c_isdigit (*s) /* Literal number. */
return gdbarch->stap_is_single_operand != NULL;
}
-int
+bool
gdbarch_stap_is_single_operand (struct gdbarch *gdbarch, const char *s)
{
gdb_assert (gdbarch != NULL);
- Register displacement, e.g. `4(%eax)' on x86
This function should check for these patterns on the string
- and return 1 if some were found, or zero otherwise. Please try to match
+ and return true if some were found, or false otherwise. Please try to match
as much info as you can from the string, i.e., if you have to match
something like `(%', do not match just the `('. */
extern bool gdbarch_stap_is_single_operand_p (struct gdbarch *gdbarch);
-typedef int (gdbarch_stap_is_single_operand_ftype) (struct gdbarch *gdbarch, const char *s);
-extern int gdbarch_stap_is_single_operand (struct gdbarch *gdbarch, const char *s);
+typedef bool (gdbarch_stap_is_single_operand_ftype) (struct gdbarch *gdbarch, const char *s);
+extern bool gdbarch_stap_is_single_operand (struct gdbarch *gdbarch, const char *s);
extern void set_gdbarch_stap_is_single_operand (struct gdbarch *gdbarch, gdbarch_stap_is_single_operand_ftype *stap_is_single_operand);
/* Function used to handle a "special case" in the parser.
- Register displacement, e.g. `4(%eax)' on x86
This function should check for these patterns on the string
-and return 1 if some were found, or zero otherwise. Please try to match
+and return true if some were found, or false otherwise. Please try to match
as much info as you can from the string, i.e., if you have to match
something like `(%', do not match just the `('.
""",
- type="int",
+ type="bool",
name="stap_is_single_operand",
params=[("const char *", "s")],
predicate=True,
/* Implementation of `gdbarch_stap_is_single_operand', as defined in
gdbarch.h. */
-int
+bool
i386_stap_is_single_operand (struct gdbarch *gdbarch, const char *s)
{
return (*s == '$' /* Literal number. */
/* SystemTap related functions. */
-extern int i386_stap_is_single_operand (struct gdbarch *gdbarch,
- const char *s);
+extern bool i386_stap_is_single_operand (struct gdbarch *gdbarch,
+ const char *s);
extern expr::operation_up i386_stap_parse_special_token
(struct gdbarch *gdbarch, struct stap_parse_info *p);
/* Implementation of `gdbarch_stap_is_single_operand', as defined in
gdbarch.h. */
-static int
+static bool
ia64_linux_stap_is_single_operand (struct gdbarch *gdbarch, const char *s)
{
return ((c_isdigit (*s) && s[1] == '[' && s[2] == 'r') /* Displacement. */
/* Implementation of `gdbarch_stap_is_single_operand', as defined in
gdbarch.h. */
-static int
+static bool
ppc_stap_is_single_operand (struct gdbarch *gdbarch, const char *s)
{
return (*s == 'i' /* Literal number. */
/* Implementation of `gdbarch_stap_is_single_operand', as defined in
gdbarch.h. */
-static int
+static bool
riscv_stap_is_single_operand (struct gdbarch *gdbarch, const char *s)
{
return (c_isdigit (*s) /* Literal number. */
/* Implementation of `gdbarch_stap_is_single_operand', as defined in
gdbarch.h. */
-static int
+static bool
s390_stap_is_single_operand (struct gdbarch *gdbarch, const char *s)
{
return ((c_isdigit (*s) && s[1] == '(' && s[2] == '%') /* Displacement