This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/2] Move code to disable ASR to nat/
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: sergiodj at redhat dot com (Sergio Durigan Junior)
- Cc: gdb-patches at sourceware dot org (GDB Patches), palves at redhat dot com (Pedro Alves), gbenson at redhat dot com (Gary Benson), sergiodj at redhat dot com (Sergio Durigan Junior)
- Date: Fri, 16 Jan 2015 16:38:46 +0100 (CET)
- Subject: Re: [PATCH 2/2] Move code to disable ASR to nat/
- Authentication-results: sourceware.org; auth=none
Sergio Durigan Junior wrote:
> 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.
This breaks building on my RHEL 5 machine:
/home/uweigand/dailybuild/spu-tc-2015-01-15/binutils-gdb-head/binutils-gdb/gdb/nat/linux-personality.c: In function 'maybe_disable_address_space_randomization':
/home/uweigand/dailybuild/spu-tc-2015-01-15/binutils-gdb-head/binutils-gdb/gdb/nat/linux-personality.c:80: error: 'ADDR_NO_RANDOMIZE' undeclared (first use in this function)
/home/uweigand/dailybuild/spu-tc-2015-01-15/binutils-gdb-head/binutils-gdb/gdb/nat/linux-personality.c:80: error: (Each undeclared identifier is reported only once
/home/uweigand/dailybuild/spu-tc-2015-01-15/binutils-gdb-head/binutils-gdb/gdb/nat/linux-personality.c:80: error: for each function it appears in.)
It looks like this is because you replaced:
> -# if !HAVE_DECL_ADDR_NO_RANDOMIZE
by:
> +# ifndef HAVE_DECL_ADDR_NO_RANDOMIZE
but config.h on my machine without ADDR_NO_RANDOMIZE contains:
#define HAVE_DECL_ADDR_NO_RANDOMIZE 0
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com