using init_reg_ftype = void (gdbarch *, int, dwarf2_frame_state_reg *,
const frame_info_ptr &);
-using signal_frame_p_ftype = int (gdbarch *, const frame_info_ptr &);
+using signal_frame_p_ftype = bool (gdbarch *, const frame_info_ptr &);
using adjust_regnum_ftype = int (gdbarch *, int, int);
/* If DWARF supoprt was requested, create the real prototype for the
Without this function, the frame is recognized as a normal frame which is
not expected. */
-int
+bool
darwin_dwarf_signal_frame_p (struct gdbarch *gdbarch,
const frame_info_ptr &this_frame)
{
extern int i386_darwin_thread_state_reg_offset[];
extern const int i386_darwin_thread_state_num_regs;
-int darwin_dwarf_signal_frame_p (struct gdbarch *, const frame_info_ptr &);
+bool darwin_dwarf_signal_frame_p (struct gdbarch *, const frame_info_ptr &);
#endif /* GDB_I386_DARWIN_TDEP_H */
|| strcmp ("__restore_rt", name) == 0);
}
-/* Return one if the PC of THIS_FRAME is in a signal trampoline which
+/* Return true if the PC of THIS_FRAME is in a signal trampoline which
may have DWARF-2 CFI. */
-static int
+static bool
i386_linux_dwarf_signal_frame_p (struct gdbarch *gdbarch,
const frame_info_ptr &this_frame)
{
/* If a vsyscall DSO is in use, the signal trampolines may have these
names. */
- if (name && (strcmp (name, "__kernel_sigreturn") == 0
- || strcmp (name, "__kernel_rt_sigreturn") == 0))
- return 1;
-
- return 0;
+ return (name != nullptr
+ && (streq (name, "__kernel_sigreturn")
+ || streq (name, "__kernel_rt_sigreturn")));
}
/* Offset to struct sigcontext in ucontext, from <asm/ucontext.h>. */