fbsd nat: Disable address space randomization when requested.
authorJohn Baldwin <jhb@FreeBSD.org>
Mon, 14 Jun 2021 21:28:26 +0000 (14:28 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Mon, 14 Jun 2021 21:55:48 +0000 (14:55 -0700)
commit09db4332c6017ab57cd136788c48e5a81e3b9399
treed0c6e194cab1c0161bd3c4b94f8980a6b5eb5614
parentc9923e71ff57ce6e824833560aae59057c6f5783
fbsd nat: Disable address space randomization when requested.

Use procctl(2) with PROC_ASLR_CTL to disable address space
randomization in the current gdb process before forking a child
process for a new inferior when address space randomization is
disabled.

gdb/ChangeLog:

* configure.ac: Check for <sys/procctl.h>.
* config.in, configure: Regenerate.
* fbsd-nat.c: Include <sys/procctl.h> if present.
[PROC_ASLR_CTL] (maybe_disable_address_space_randomization): New.
(fbsd_nat_target::create_inferior)
(fbsd_nat_target::supports_disable_randomization): New.
* fbsd-nat.h (fbsd_nat_target::create_inferior)
(fbsd_nat_target::supports_disable_randomization): New.
gdb/ChangeLog
gdb/config.in
gdb/configure
gdb/configure.ac
gdb/fbsd-nat.c
gdb/fbsd-nat.h
This page took 0.025137 seconds and 4 git commands to generate.