This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit] Print the name of the float-format
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 27 Nov 2002 10:54:38 -0500
- Subject: [commit] Print the name of the float-format
Hello,
This patch tweaks ``(gdb) maint print arch'' so that the
TARGET_FLOAT_FORMAT et.al. have their name, and not their address,
printed vis:
gdbarch_dump: TARGET_FLOAT_FORMAT = floatformat_ieee_single_big
BTW, anyone know of a way for gdb to find its own executable so that it
can translate gdbarch function addresses into function names?
committed,
Andrew
2002-11-26 Andrew Cagney <ac131313@redhat.com>
* gdbarch.sh (TARGET_FLOAT_FORMAT): Print the float format name.
(TARGET_DOUBLE_FORMAT, TARGET_LONG_DOUBLE_FORMAT): Ditto.
* gdbarch.c: Re-generate.
Index: gdbarch.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.c,v
retrieving revision 1.161
diff -u -r1.161 gdbarch.c
--- gdbarch.c 25 Nov 2002 04:47:56 -0000 1.161
+++ gdbarch.c 27 Nov 2002 15:48:21 -0000
@@ -2132,8 +2132,8 @@
"gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
XSTRING (TARGET_DOUBLE_FORMAT));
fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
- (long) TARGET_DOUBLE_FORMAT);
+ "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
+ gdbarch->float_format->name);
#endif
#ifdef TARGET_FLOAT_BIT
fprintf_unfiltered (file,
@@ -2148,8 +2148,8 @@
"gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
XSTRING (TARGET_FLOAT_FORMAT));
fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
- (long) TARGET_FLOAT_FORMAT);
+ "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
+ gdbarch->float_format->name);
#endif
#ifdef TARGET_INT_BIT
fprintf_unfiltered (file,
@@ -2180,8 +2180,8 @@
"gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
XSTRING (TARGET_LONG_DOUBLE_FORMAT));
fprintf_unfiltered (file,
- "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
- (long) TARGET_LONG_DOUBLE_FORMAT);
+ "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
+ gdbarch->float_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.173
diff -u -r1.173 gdbarch.sh
--- gdbarch.sh 25 Nov 2002 04:47:56 -0000 1.173
+++ gdbarch.sh 27 Nov 2002 15:48:22 -0000
@@ -578,9 +578,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)
-v:2:TARGET_DOUBLE_FORMAT:const struct floatformat *:double_format::::::default_double_format (gdbarch)
-v:2:TARGET_LONG_DOUBLE_FORMAT:const struct floatformat *:long_double_format::::::default_double_format (gdbarch)
+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
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.