This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA 3/5] New patches to support --enable-targets=all for mingw64
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: <gdb-patches at sourceware dot org>
- Date: Fri, 10 Sep 2010 16:01:18 +0200
- Subject: [RFA 3/5] New patches to support --enable-targets=all for mingw64
I tried to compile GDB with
--enable-targets=all for x86_64-w64-mingw32
target.
As 'long' type is 4-byte while pointer type is 8-byte,
this target is quite sensitive to so 'dirty' code
lying around like casting 'long' or 'unsigned long' to pointers...
I had to fix several sources to be able to
successfully compile GDB with those configuration options.
3) Change some types from 'long' to 'CORE_ADDRESS',
if they could carry pointers.
in coffread.c
Pierre Muller
Pascal language support maintainer for GDB
2010-09-10 Pierre Muller <muller@ics.u-strasbg.fr>
* coffread.c (struct coff_symbol): Change c_value type from `long' to
`CORE_ADDRESS' as it might contain target addresses.
Index: src/gdb/coffread.c
===================================================================
RCS file: /cvs/src/src/gdb/coffread.c,v
retrieving revision 1.109
diff -u -p -r1.109 coffread.c
--- src/gdb/coffread.c 9 Aug 2010 19:42:46 -0000 1.109
+++ src/gdb/coffread.c 9 Sep 2010 16:39:57 -0000
@@ -131,7 +131,7 @@ struct coff_symbol
char *c_name;
int c_symnum; /* symbol number of this entry */
int c_naux; /* 0 if syment only, 1 if syment + auxent, etc */
- long c_value;
+ CORE_ADDR c_value;
int c_sclass;
int c_secnum;
unsigned int c_type;