From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24263 invoked by alias); 6 Feb 2002 12:55:11 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 24078 invoked from network); 6 Feb 2002 12:55:03 -0000 Received: from unknown (HELO fw-cam.cambridge.arm.com) (193.131.176.3) by sources.redhat.com with SMTP; 6 Feb 2002 12:55:03 -0000 Received: by fw-cam.cambridge.arm.com; id MAA03732; Wed, 6 Feb 2002 12:55:00 GMT Received: from unknown(172.16.1.2) by fw-cam.cambridge.arm.com via smap (V5.5) id xma003336; Wed, 6 Feb 02 12:54:42 GMT Received: from cam-mail2.cambridge.arm.com (localhost [127.0.0.1]) by cam-admin0.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id MAA27798; Wed, 6 Feb 2002 12:54:41 GMT Received: from sun18.cambridge.arm.com (sun18.cambridge.arm.com [172.16.2.18]) by cam-mail2.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id MAA07185; Wed, 6 Feb 2002 12:54:41 GMT Message-Id: <200202061254.MAA07185@cam-mail2.cambridge.arm.com> X-Mailer: exmh version 2.0.2 2/24/98 To: gdb-patches@sources.redhat.com cc: Richard.Earnshaw@arm.com, Andrew Cagney Reply-To: Richard.Earnshaw@arm.com Organization: ARM Ltd. X-Telephone: +44 1223 400569 (direct+voicemail), +44 1223 400400 (switchbd) X-Fax: +44 1223 400410 X-Address: ARM Ltd., 110 Fulbourn Road, Cherry Hinton, Cambridge CB1 9NJ. X-Url: http://www.arm.com/ Subject: PATCH multi-arch FLOAT_INFO Mime-Version: 1.0 Content-Type: multipart/mixed ; boundary="==_Exmh_16521048200" Date: Wed, 06 Feb 2002 04:55:00 -0000 From: Richard Earnshaw X-SW-Source: 2002-02/txt/msg00165.txt.bz2 This is a multipart MIME message. --==_Exmh_16521048200 Content-Type: text/plain; charset=us-ascii Content-length: 679 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 * 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. --==_Exmh_16521048200 Content-Type: text/x-patch ; name="gdb-finfo.patch"; charset=us-ascii Content-Description: gdb-finfo.patch Content-Disposition: attachment; filename="gdb-finfo.patch" Content-length: 7082 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 } /* ARGSUSED */ --- 1846,1852 ---- static void float_info (char *addr_exp, int from_tty) { ! PRINT_FLOAT_INFO (); } /* 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 --==_Exmh_16521048200--