Add basic event handling in the NetBSD target
Implement the following events:
- single step (TRAP_TRACE)
- software breakpoint (TRAP_DBREG)
- exec() (TRAP_EXEC)
- syscall entry/exit (TRAP_SCE / TRAP_SCX)
Add support for NetBSD specific ::wait () and ::resume ().
Instruct the generic code that exec and syscall events are supported.
Define an empty nbsd_get_syscall_number as it is prerequisite for
catching syscall entry and exit events, even if it is unused.
This function is used to detect whether the gdbarch supports the
'catch syscall' feature.
gdb/ChangeLog:
* nbsd-nat.c: Include "sys/wait.h".
(nbsd_resume, nbsd_nat_target::resume, nbsd_wait)
(nbsd_nat_target::wait, nbsd_nat_target::insert_exec_catchpoint)
(nbsd_nat_target::remove_exec_catchpoint)
(nbsd_nat_target::set_syscall_catchpoint): Add.
* nbsd-nat.h (nbsd_nat_target::resume, nbsd_nat_target::wait)
(nbsd_nat_target::insert_exec_catchpoint)
(nbsd_nat_target::remove_exec_catchpoint)
(nbsd_nat_target::set_syscall_catchpoint): Add.
* nbsd-tdep.c (nbsd_get_syscall_number): Add.
(nbsd_init_abi): Call `set_gdbarch_get_syscall_number' and pass
`nbsd_get_syscall_number'.