This is the mail archive of the gdb-cvs@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] Fix nat/linux-personality.c regression on RHEL-5


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4c347be60a1c25f78826fbf86d416a278740145b

commit 4c347be60a1c25f78826fbf86d416a278740145b
Author: Sergio Durigan Junior <sergiodj@redhat.com>
Date:   Fri Jan 16 11:42:28 2015 -0500

    Fix nat/linux-personality.c regression on RHEL-5
    
    This commit fixes the regression on RHEL-5 systems introduced by
    nat/linux-personality.c's check of HAVE_DECL_ADDR_NO_RANDOMIZE.
    RHEL-5 systems define HAVE_DECL_ADDR_NO_RANDOMIZE as zero, so we
    cannot use #ifndef; instead this patch uses the "#if !" construction.
    
    The regression was reported by Ulrich Weigand here:
    
      <https://sourceware.org/ml/gdb-patches/2015-01/msg00458.html>
    
    gdb/ChangeLog
    2015-01-16  Sergio Durigan Junior  <sergiodj@redhat.com>
    
    	* nat/linux-personality.c: Replace "#ifndef
    	HAVE_DECL_ADDR_NO_RANDOMIZE" by "#if
    	!HAVE_DECL_ADDR_NO_RANDOMIZE", fixing a regression in RHEL-5
    	systems.

Diff:
---
 gdb/ChangeLog               | 7 +++++++
 gdb/nat/linux-personality.c | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b7ba1b2..b95abdc 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2015-01-16  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* nat/linux-personality.c: Replace "#ifndef
+	HAVE_DECL_ADDR_NO_RANDOMIZE" by "#if
+	!HAVE_DECL_ADDR_NO_RANDOMIZE", fixing a regression in RHEL-5
+	systems.
+
 2015-01-16  Eli Zaretskii  <eliz@gnu.org>
 
 	* tui/tui-win.c (tui_rehighlight_all, tui_set_var_cmd): New
diff --git a/gdb/nat/linux-personality.c b/gdb/nat/linux-personality.c
index f61a2c6..3ea8755 100644
--- a/gdb/nat/linux-personality.c
+++ b/gdb/nat/linux-personality.c
@@ -22,7 +22,7 @@
 
 #ifdef HAVE_PERSONALITY
 # include <sys/personality.h>
-# ifndef HAVE_DECL_ADDR_NO_RANDOMIZE
+# if !HAVE_DECL_ADDR_NO_RANDOMIZE
 #  define ADDR_NO_RANDOMIZE 0x0040000
 # endif /* ! HAVE_DECL_ADDR_NO_RANDOMIZE */
 #endif /* HAVE_PERSONALITY */


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