Add support for catching exec events on FreeBSD.
FreeBSD kernels that support fork tracing always stop a process to
report events for exec. Such a process will have the PL_FLAG_EXEC
flag set in the pl_flags field of the ptrace_lwpinfo struct returned
by PT_LWPINFO. The structure does not include the pathname passed to
exec, so use fbsd_pid_to_exec_file to query the pathname of the
process' executable.
gdb/ChangeLog:
* fbsd-nat.c: (fbsd_wait) [PL_FLAG_EXEC]: Report TARGET_WAITKIND_EXECD
event if PL_FLAG_EXEC is set.
[PL_FLAG_EXEC] (fbsd_insert_exec_catchpoint): New function.
[PL_FLAG_EXEC] (fbsd_remove_exec_catchpoint): New function.
(fbsd_nat_add_target) [PL_FLAG_EXEC]: Set
"to_insert_exec_catchpoint" to "fbsd_insert_exec_catchpoint".
Set "to_remove_exec_catchpoint" to "fbsd_remove_exec_catchpoint".