gdb/dwarf: change dwarf2_frame_ops to return bool

Change-Id: I0531b413823b1edc419be8f4977e9baa9efe3833
Approved-By: Tom Tromey <tom@tromey.com>
This commit is contained in:
Simon Marchi 2026-03-11 14:05:45 -04:00 committed by Simon Marchi
parent 2cb2c073aa
commit a4d7df7666
4 changed files with 8 additions and 10 deletions

View file

@ -200,7 +200,7 @@ struct dwarf2_frame_state
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

View file

@ -97,7 +97,7 @@ i386_darwin_sigcontext_addr (const frame_info_ptr &this_frame)
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)
{

View file

@ -27,6 +27,6 @@
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 */

View file

@ -250,10 +250,10 @@ i386_linux_sigtramp_p (const frame_info_ptr &this_frame)
|| 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)
{
@ -264,11 +264,9 @@ i386_linux_dwarf_signal_frame_p (struct gdbarch *gdbarch,
/* 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>. */