This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit] Fix floatformat printing in gdbarch.sh
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Sun, 08 Dec 2002 13:52:58 -0500
- Subject: [commit] Fix floatformat printing in gdbarch.sh
Hello,
The attached tweak fixes the printing of float-formats (double, float,
long double) by gdbarch. The original patch didn't work with
non-multi-arch targets :-(
committing,
Andrew
2002-12-07 Andrew Cagney <ac131313@redhat.com>
* gdbarch.sh (TARGET_FLOAT_FORMAT): Use the macro when printing
the format name.
(TARGET_DOUBLE_FORMAT, TARGET_LONG_DOUBLE_FORMAT): Ditto.
* gdbarch.c: Regenerate.
Index: gdbarch.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.c,v
retrieving revision 1.167
diff -u -r1.167 gdbarch.c
--- gdbarch.c 6 Dec 2002 19:26:03 -0000 1.167
+++ gdbarch.c 7 Dec 2002 23:58:41 -0000
@@ -2335,7 +2335,7 @@
XSTRING (TARGET_DOUBLE_FORMAT));
fprintf_unfiltered (file,
"gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
- gdbarch->float_format->name);
+ (TARGET_DOUBLE_FORMAT)->name);
#endif
#ifdef TARGET_FLOAT_BIT
fprintf_unfiltered (file,
@@ -2351,7 +2351,7 @@
XSTRING (TARGET_FLOAT_FORMAT));
fprintf_unfiltered (file,
"gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
- gdbarch->float_format->name);
+ (TARGET_FLOAT_FORMAT)->name);
#endif
#ifdef TARGET_INT_BIT
fprintf_unfiltered (file,
@@ -2383,7 +2383,7 @@
XSTRING (TARGET_LONG_DOUBLE_FORMAT));
fprintf_unfiltered (file,
"gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
- gdbarch->float_format->name);
+ (TARGET_LONG_DOUBLE_FORMAT)->name);
#endif
#ifdef TARGET_LONG_LONG_BIT
fprintf_unfiltered (file,
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.179
diff -u -r1.179 gdbarch.sh
--- gdbarch.sh 6 Dec 2002 19:26:04 -0000 1.179
+++ gdbarch.sh 8 Dec 2002 00:04:06 -0000
@@ -589,9 +589,9 @@
F:2:SAVE_DUMMY_FRAME_TOS:void:save_dummy_frame_tos:CORE_ADDR sp:sp::0:0
v:2:PARM_BOUNDARY:int:parm_boundary
#
-v:2:TARGET_FLOAT_FORMAT:const struct floatformat *:float_format::::::default_float_format (gdbarch)::%s:gdbarch->float_format->name
-v:2:TARGET_DOUBLE_FORMAT:const struct floatformat *:double_format::::::default_double_format (gdbarch)::%s:gdbarch->float_format->name
-v:2:TARGET_LONG_DOUBLE_FORMAT:const struct floatformat *:long_double_format::::::default_double_format (gdbarch)::%s:gdbarch->float_format->name
+v:2:TARGET_FLOAT_FORMAT:const struct floatformat *:float_format::::::default_float_format (gdbarch)::%s:(TARGET_FLOAT_FORMAT)->name
+v:2:TARGET_DOUBLE_FORMAT:const struct floatformat *:double_format::::::default_double_format (gdbarch)::%s:(TARGET_DOUBLE_FORMAT)->name
+v:2:TARGET_LONG_DOUBLE_FORMAT:const struct floatformat *:long_double_format::::::default_double_format (gdbarch)::%s:(TARGET_LONG_DOUBLE_FORMAT)->name
f:2:CONVERT_FROM_FUNC_PTR_ADDR:CORE_ADDR:convert_from_func_ptr_addr:CORE_ADDR addr:addr:::core_addr_identity::0
# On some machines there are bits in addresses which are not really
# part of the address, but are used by the kernel, the hardware, etc.