old-cross-binutils/gdb/common
Sergio Durigan Junior 8cc73a3902 Move code to disable ASR to nat/
This patch moves the shared code present on
gdb/linux-nat.c:linux_nat_create_inferior and
gdb/gdbserver/linux-low.c:linux_create_inferior to
nat/linux-personality.c.  This code is responsible for disabling
address space randomization based on user setting, and using
<sys/personality.h> to do that.  I decided to put the prototype of the
maybe_disable_address_space_randomization on nat/linux-osdata.h
because it seemed the best place to put it.

I regression-tested this patch on Fedora 20 x86_64, and found no
regressions.

gdb/ChangeLog
2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>

	* Makefile.in (HFILES_NO_SRCDIR): Add nat/linux-personality.h.
	(linux-personality.o): New rule.
	* common/common-defs.h: Include <stdint.h>.
	* config/aarch64/linux.mh (NATDEPFILES): Include
	linux-personality.o.
	* config/alpha/alpha-linux.mh (NATDEPFILES): Likewise.
	* config/arm/linux.mh (NATDEPFILES): Likewise.
	* config/i386/linux64.mh (NATDEPFILES): Likewise.
	* config/i386/linux.mh (NATDEPFILES): Likewise.
	* config/ia64/linux.mh (NATDEPFILES): Likewise.
	* config/m32r/linux.mh (NATDEPFILES): Likewise.
	* config/m68k/linux.mh (NATDEPFILES): Likewise.
	* config/mips/linux.mh (NATDEPFILES): Likewise.
	* config/pa/linux.mh (NATDEPFILES): Likewise.
	* config/powerpc/linux.mh (NATDEPFILES): Likewise.
	* config/powerpc/ppc64-linux.mh (NATDEPFILES): Likewise.
	* config/powerpc/spu-linux.mh (NATDEPFILES): Likewise.
	* config/s390/linux.mh (NATDEPFILES): Likewise.
	* config/sparc/linux64.mh (NATDEPFILES): Likewise.
	* config/sparc/linux.mh (NATDEPFILES): Likewise.
	* config/tilegx/linux.mh (NATDEPFILES): Likewise.
	* config/xtensa/linux.mh (NATDEPFILES): Likewise.
	* defs.h: Remove #include <stdint.h> (moved to
	common/common-defs.h).
	* linux-nat.c: Include nat/linux-personality.h.  Remove #include
	<sys/personality.h>; do not define ADDR_NO_RANDOMIZE (moved to
	nat/linux-personality.c).
	(linux_nat_create_inferior): Remove code to disable address space
	randomization (moved to nat/linux-personality.c).  Create cleanup
	to disable address space randomization.
	* nat/linux-personality.c: New file.
	* nat/linux-personality.h: Likewise.

gdb/gdbserver/ChangeLog
2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>

	* Makefile.in (SFILES): Add linux-personality.c.
	(linux-personality.o): New rule.
	* configure.srv (srv_linux_obj): Add linux-personality.o to the
	list of objects to be built.
	* linux-low.c: Include nat/linux-personality.h.
	(linux_create_inferior): Remove code to disable address space
	randomization (moved to ../nat/linux-personality.c).  Create
	cleanup to disable address space randomization.
2015-01-15 15:10:49 -05:00
..
agent.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
agent.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
ax.def Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
break-common.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
btrace-common.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
buffer.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
buffer.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
cleanups.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
cleanups.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
common-debug.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
common-debug.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
common-defs.h Move code to disable ASR to nat/ 2015-01-15 15:10:49 -05:00
common-exceptions.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
common-exceptions.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
common-regcache.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
common-types.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
common-utils.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
common-utils.h Move safe_strerror to common/ 2015-01-15 15:09:15 -05:00
common.host Move safe_strerror to common/ 2015-01-15 15:09:15 -05:00
common.m4 Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
create-version.sh Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
errors.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
errors.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
filestuff.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
filestuff.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
format.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
format.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
gdb_assert.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
gdb_locale.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
gdb_setjmp.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
gdb_signals.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
gdb_vecs.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
gdb_vecs.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
gdb_wait.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
host-defs.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
mingw-strerror.c Move safe_strerror to common/ 2015-01-15 15:09:15 -05:00
posix-strerror.c Move safe_strerror to common/ 2015-01-15 15:09:15 -05:00
print-utils.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
print-utils.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
ptid.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
ptid.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
queue.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
rsp-low.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
rsp-low.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
signals.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
symbol.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
vec.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
vec.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
version.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
x86-xstate.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
xml-utils.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
xml-utils.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00