From: Richard Earnshaw <rearnsha@arm.com>
To: gdb-patches@sources.redhat.com
Cc: Richard.Earnshaw@arm.com, Andrew Cagney <ac131313@cygnus.com>
Subject: PATCH multi-arch FLOAT_INFO
Date: Wed, 06 Feb 2002 04:55:00 -0000 [thread overview]
Message-ID: <200202061254.MAA07185@cam-mail2.cambridge.arm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 679 bytes --]
Ok, this contains all changes you suggested.
Andrew, I see you've already ARIed FLOAT_INFO. Do you want to add a
reference to the replacement?
R.
2002-02-06 Richard Earnshaw <rearnsha@arm.com>
* gdbarch.sh (PRINT_FLOAT_INFO): Add rule.
* gdbarch.c gdbarch.h: Regenerate.
* arch-utils.c (default_print_float_info): New function.
* arch-utils.h (default_print_float_info): Prototype it.
* infcmd.c (float_info): Call PRINT_FLOAT_INFO.
* doc/gdbint.texinfo (FLOAT_INFO): Mark as deprecated.
(PRINT_FLOAT_INFO): Document it.
* arm-tdep.c (arm_print_float_info): Renamed from arm_float_info.
* config/arm/tm-arm.h (FLOAT_INFO): Delete.
(PRINT_FLOAT_INFO): Define.
[-- Attachment #2: gdb-finfo.patch --]
[-- Type: text/x-patch , Size: 7082 bytes --]
Index: arch-utils.c
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.c,v
retrieving revision 1.50
diff -p -r1.50 arch-utils.c
*** arch-utils.c 2002/02/06 01:20:22 1.50
--- arch-utils.c 2002/02/06 11:39:37
*************** default_double_format (struct gdbarch *g
*** 225,230 ****
--- 225,243 ----
}
}
+ void
+ default_print_float_info (void)
+ {
+ #ifdef FLOAT_INFO
+ #if GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL
+ #error "FLOAT_INFO defined in multi-arch"
+ #endif
+ FLOAT_INFO;
+ #else
+ printf_filtered ("No floating point info available for this processor.\n");
+ #endif
+ }
+
/* Misc helper functions for targets. */
int
Index: arch-utils.h
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.h,v
retrieving revision 1.28
diff -p -r1.28 arch-utils.h
*** arch-utils.h 2002/02/06 01:20:22 1.28
--- arch-utils.h 2002/02/06 11:39:37
*************** extern int generic_in_solib_call_trampol
*** 146,151 ****
--- 146,153 ----
extern int generic_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc);
+ extern void default_print_float_info (void);
+
/* Assume all registers are the same size and a size identical to that
of the integer type. */
extern int generic_register_raw_size (int regnum);
Index: arm-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-tdep.c,v
retrieving revision 1.33
diff -p -r1.33 arm-tdep.c
*** arm-tdep.c 2002/02/05 04:37:21 1.33
--- arm-tdep.c 2002/02/06 11:39:37
*************** print_fpu_flags (int flags)
*** 1559,1566 ****
putchar ('\n');
}
void
! arm_float_info (void)
{
register unsigned long status = read_register (FPS_REGNUM);
int type;
--- 1559,1568 ----
putchar ('\n');
}
+ /* Print interesting information about the floating point processor
+ (if present) or emulator. */
void
! arm_print_float_info (void)
{
register unsigned long status = read_register (FPS_REGNUM);
int type;
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.107
diff -p -r1.107 gdbarch.sh
*** gdbarch.sh 2002/02/06 01:20:23 1.107
--- gdbarch.sh 2002/02/06 11:39:37
*************** f:2:REGISTER_VIRTUAL_SIZE:int:register_v
*** 450,455 ****
--- 450,456 ----
v:2:MAX_REGISTER_VIRTUAL_SIZE:int:max_register_virtual_size::::0:-1
f:2:REGISTER_VIRTUAL_TYPE:struct type *:register_virtual_type:int reg_nr:reg_nr::0:0
f:2:DO_REGISTERS_INFO:void:do_registers_info:int reg_nr, int fpregs:reg_nr, fpregs:::do_registers_info::0
+ f:2:PRINT_FLOAT_INFO:void:print_float_info:void::::default_print_float_info::0
# MAP a GDB RAW register number onto a simulator register number. See
# also include/...-sim.h.
f:2:REGISTER_SIM_REGNO:int:register_sim_regno:int reg_nr:reg_nr:::default_register_sim_regno::0
Index: infcmd.c
===================================================================
RCS file: /cvs/src/src/gdb/infcmd.c,v
retrieving revision 1.40
diff -p -r1.40 infcmd.c
*** infcmd.c 2002/02/05 04:37:21 1.40
--- infcmd.c 2002/02/06 11:39:42
*************** interrupt_target_command (char *args, in
*** 1846,1856 ****
static void
float_info (char *addr_exp, int from_tty)
{
! #ifdef FLOAT_INFO
! FLOAT_INFO;
! #else
! printf_filtered ("No floating point info available for this processor.\n");
! #endif
}
\f
/* ARGSUSED */
--- 1846,1852 ----
static void
float_info (char *addr_exp, int from_tty)
{
! PRINT_FLOAT_INFO ();
}
\f
/* ARGSUSED */
Index: config/arm/tm-arm.h
===================================================================
RCS file: /cvs/src/src/gdb/config/arm/tm-arm.h,v
retrieving revision 1.21
diff -p -r1.21 tm-arm.h
*** tm-arm.h 2002/02/04 11:55:36 1.21
--- tm-arm.h 2002/02/06 11:39:42
*************** extern breakpoint_from_pc_fn arm_breakpo
*** 120,131 ****
#define DECR_PC_AFTER_BREAK 0
! /* Code to execute to print interesting information about the floating
! point processor (if any) or emulator. No need to define if there
! is nothing to do. */
! extern void arm_float_info (void);
!
! #define FLOAT_INFO { arm_float_info (); }
/* Say how long (ordinary) registers are. This is a piece of bogosity
used in push_word and a few other places; REGISTER_RAW_SIZE is the
--- 120,127 ----
#define DECR_PC_AFTER_BREAK 0
! void arm_print_float_info (void);
! #define PRINT_FLOAT_INFO() arm_print_float_info ()
/* Say how long (ordinary) registers are. This is a piece of bogosity
used in push_word and a few other places; REGISTER_RAW_SIZE is the
Index: config/m68k/nm-apollo68b.h
===================================================================
RCS file: /cvs/src/src/gdb/config/m68k/nm-apollo68b.h,v
retrieving revision 1.2
diff -p -r1.2 nm-apollo68b.h
*** nm-apollo68b.h 2001/03/06 08:21:30 1.2
--- nm-apollo68b.h 2002/02/06 11:39:42
***************
*** 30,37 ****
#define KERNEL_U_ADDR 0
- #undef FLOAT_INFO /* No float info yet */
-
#define REGISTER_U_ADDR(addr, blockend, regno) \
(addr) = (6 + 4 * (regno))
--- 30,35 ----
Index: config/ns32k/nm-nbsd.h
===================================================================
RCS file: /cvs/src/src/gdb/config/ns32k/nm-nbsd.h,v
retrieving revision 1.3
diff -p -r1.3 nm-nbsd.h
*** nm-nbsd.h 2001/03/06 08:21:33 1.3
--- nm-nbsd.h 2002/02/06 11:39:42
***************
*** 26,32 ****
#include "nm-nbsd.h"
#if 0
! #define FLOAT_INFO { extern ns32k_float_info(); ns32k_float_info(); }
#endif
#define REGISTER_U_ADDR(addr, blockend, regno) \
--- 26,33 ----
#include "nm-nbsd.h"
#if 0
! extern ns32k_float_info()
! #define FLOAT_INFO() ns32k_float_info ()
#endif
#define REGISTER_U_ADDR(addr, blockend, regno) \
Index: doc/gdbint.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v
retrieving revision 1.63
diff -p -r1.63 gdbint.texinfo
*** gdbint.texinfo 2002/01/29 16:32:02 1.63
--- gdbint.texinfo 2002/02/06 11:39:45
*************** library in which breakpoints cannot be s
*** 2864,2869 ****
--- 2864,2874 ----
@findex DO_REGISTERS_INFO
If defined, use this to print the value of a register or all registers.
+ @item PRINT_FLOAT_INFO()
+ #findex PRINT_FLOAT_INFO
+ If defined, then the @samp{info float} command will print information about
+ the processor's floating point unit.
+
@item DWARF_REG_TO_REGNUM
@findex DWARF_REG_TO_REGNUM
Convert DWARF register number into @value{GDBN} regnum. If not defined,
*************** Predicate for @code{EXTRACT_STRUCT_VALUE
*** 2904,2911 ****
@item FLOAT_INFO
@findex FLOAT_INFO
! If defined, then the @samp{info float} command will print information about
! the processor's floating point unit.
@item FP_REGNUM
@findex FP_REGNUM
--- 2909,2915 ----
@item FLOAT_INFO
@findex FLOAT_INFO
! Deprecated in favor of @code{PRINT_FLOAT_INFO}.
@item FP_REGNUM
@findex FP_REGNUM
next reply other threads:[~2002-02-06 12:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-06 4:55 Richard Earnshaw [this message]
2002-02-06 4:58 ` Richard Earnshaw
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200202061254.MAA07185@cam-mail2.cambridge.arm.com \
--to=rearnsha@arm.com \
--cc=Richard.Earnshaw@arm.com \
--cc=ac131313@cygnus.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox