This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA 2/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 15:58:46 +0200
- Subject: [RFA 2/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.
2) Add intermediate typecast to uintptr_t to avoid
compilation warnings.
in alpha-mdebug-tdep.c
Note: this is a simple compilation failure fix,
I suspect that those kind of assignments might not work correctly
in not on a native configuration...
Pierre Muller
Pascal language support maintainer for GDB
2010-09-10 Pierre Muller <muller@ics.u-strasbg.fr>
* alpha-mdebug-tdep.c (find_proc_desc): Cast SYMBOL_VALUE result to
uintptr_t before cast to pointer to avoid warning.
Index: src/gdb/alpha-mdebug-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/alpha-mdebug-tdep.c,v
retrieving revision 1.25
diff -u -p -r1.25 alpha-mdebug-tdep.c
--- src/gdb/alpha-mdebug-tdep.c 23 Apr 2010 15:14:22 -0000 1.25
+++ src/gdb/alpha-mdebug-tdep.c 9 Sep 2010 16:39:57 -0000
@@ -115,7 +115,7 @@ find_proc_desc (CORE_ADDR pc)
if (sym)
{
- proc_desc = (struct mdebug_extra_func_info *) SYMBOL_VALUE (sym);
+ proc_desc = (struct mdebug_extra_func_info *) (uintptr_t) SYMBOL_VALUE (sym);
/* Correct incorrect setjmp procedure descriptor from the library
to make backtrace through setjmp work. */