This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Add support for catching exec events on FreeBSD.


*** TEST RESULTS FOR COMMIT d2b41ca0f9c5641a6b8f42c8013ba042cf5ba120 ***

Author: John Baldwin <jhb@FreeBSD.org>
Branch: master
Commit: d2b41ca0f9c5641a6b8f42c8013ba042cf5ba120

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".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]