Make it return a bool and adjust a few comparisons where it's used.
Change-Id: Ic77d23b0dcfcfc9195dfe65e4c7ff9cf3229f6fb
return 0;
}
-int
-catch_syscall_enabled (void)
+/* See breakpoint.h. */
+
+bool
+catch_syscall_enabled ()
{
struct catch_syscall_inferior_data *inf_data
= get_catch_syscall_inferior_data (current_inferior ());
extern void set_breakpoint_condition (int bpnum, const char *exp,
int from_tty, bool force);
-/* Checks if we are catching syscalls or not.
- Returns 0 if not, greater than 0 if we are. */
-extern int catch_syscall_enabled (void);
+/* Checks if we are catching syscalls or not. */
+extern bool catch_syscall_enabled ();
/* Checks if we are catching syscalls with the specific
syscall_number. Used for "filtering" the catchpoints.
int pid = ptid.lwp ();
int request;
- if (catch_syscall_enabled () > 0)
+ if (catch_syscall_enabled ())
request = PTRACE_SYSCALL;
else
request = PTRACE_CONT;
single-threaded processes, so simply resume the inferior. */
ptid = ptid_t (inferior_ptid.pid ());
- if (catch_syscall_enabled () > 0)
+ if (catch_syscall_enabled ())
request = PT_SYSCALL;
else
request = PT_CONTINUE;
syscall_number = ecs->ws.syscall_number ();
ecs->event_thread->set_stop_pc (regcache_read_pc (regcache));
- if (catch_syscall_enabled () > 0
+ if (catch_syscall_enabled ()
&& catching_syscall_number (syscall_number))
{
infrun_debug_printf ("syscall number=%d", syscall_number);
perror_with_name (("ptrace"));
}
- if (catch_syscall_enabled () > 0)
+ if (catch_syscall_enabled ())
request = PT_SYSCALL;
else
request = PT_CONTINUE;