This is the mail archive of the gdb-patches@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]

RFA: Fix build regression on 32-bit hosts [Re: [RFA][PATCH v5 2/2] S/390: Add TDB regset]


The patch below fixes the two build failure reports
due to last s390-tdep.c commit.

This is done by replacing system elf.h header inclusion
by use of GDB include/elf/common.h.
This fixes my bug report.
For Jan's problem of third parameter type,
I simply change hwcap local variable type to 
CORE_ADDR as expected for target_auxv_search function.

As and extra bonus, when looking for AT_HWCAP,
I noticed that arm-linux-tdep.c had it's own definition
instead of using the one from elf/common.h.
(This could be split from that patch and submitted separately if
requested...)


Pierre Muller


It also 
2013-09-15  Pierre Muller  <muller@sourceware.org>

        * arm-linux-tdep.c: Add "elf/common.h" header.
        Remove AT_HWCAP macro definintion as it is provided in
        added include file.
        * s390-tdep.c: Remove system header <elf.h>
        Add "elf/common.h" header for AT_HWCAP definition.
        (s390_core_read_description): Use correct CORE_ADDR
        for hwcap local variable used as third parameter
        of function target_auxv_search.

Index: src/gdb/arm-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-linux-tdep.c,v
retrieving revision 1.96
diff -u -p -r1.96 arm-linux-tdep.c
--- src/gdb/arm-linux-tdep.c    22 Aug 2013 20:32:54 -0000      1.96
+++ src/gdb/arm-linux-tdep.c    15 Sep 2013 21:23:40 -0000
@@ -49,12 +49,9 @@
 #include "parser-defs.h"
 #include "user-regs.h"
 #include <ctype.h>
-
+#include "elf/common.h"
 #include "gdb_string.h"

-/* This is defined in <elf.h> on ARM GNU/Linux systems.  */
-#define AT_HWCAP        16
-
 extern int arm_apcs_32;

 /* Under ARM GNU/Linux the traditional way of performing a breakpoint
Index: src/gdb/s390-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/s390-tdep.c,v
retrieving revision 1.215
diff -u -p -r1.215 s390-tdep.c
--- src/gdb/s390-tdep.c 13 Sep 2013 14:17:29 -0000      1.215
+++ src/gdb/s390-tdep.c 15 Sep 2013 21:23:43 -0000
@@ -52,7 +52,7 @@
 #include "user-regs.h"
 #include "cli/cli-utils.h"
 #include <ctype.h>
-#include <elf.h>
+#include "elf/common.h"

 #include "features/s390-linux32.c"
 #include "features/s390-linux32v1.c"
@@ -807,7 +807,7 @@ s390_core_read_description (struct gdbar
   asection *v1 = bfd_get_section_by_name (abfd, ".reg-s390-last-break");
   asection *v2 = bfd_get_section_by_name (abfd, ".reg-s390-system-call");
   asection *section = bfd_get_section_by_name (abfd, ".reg");
-  unsigned long hwcap = 0;
+  CORE_ADDR hwcap = 0;

   target_auxv_search (target, AT_HWCAP, &hwcap);
   if (!section)


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