This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFC/RFA] Remove bad pointer to long typecast in symfile.c source
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: "'GDB Patches'" <gdb-patches at sourceware dot org>
- Date: Tue, 21 Aug 2012 12:13:12 +0200
- Subject: [RFC/RFA] Remove bad pointer to long typecast in symfile.c source
long type is 4 byte long, while pointer is 8 byte long
for x86_64-w64-mingw32.
Thus I get a warning about typecast from pointer to integer of different
size.
Anyhow, GDB internal pointers should be printed out
using the host_address_to_string function, no?
Pierre Muller
GDB pascal language maintainer
2012-08-13 Pierre Muller <muller@ics.u-strasbg.fr>
* symfile.c (allocate_symtab): Use host_address_to_string
function instead of cast of pointer to long which is not
compatible with x86_64-w64-mingw32 build.
Index: src/gdb/symfile.c
===================================================================
RCS file: /cvs/src/src/gdb/symfile.c,v
retrieving revision 1.344
diff -u -p -r1.344 symfile.c
--- src/gdb/symfile.c 9 Aug 2012 06:26:24 -0000 1.344
+++ src/gdb/symfile.c 13 Aug 2012 14:32:56 -0000
@@ -2883,8 +2883,8 @@ allocate_symtab (const char *filename, s
last_objfile_name);
}
fprintf_unfiltered (gdb_stdlog,
- "Created symtab 0x%lx for module %s.\n",
- (long) symtab, filename);
+ "Created symtab %s for module %s.\n",
+ host_address_to_string (symtab), filename);
}
return (symtab);
~