This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[rfc] Convert SOFTWARE_SINGLE_STEP to multi-arch
- To: GDB Patches <gdb-patches at sourceware dot cygnus dot com>
- Subject: [rfc] Convert SOFTWARE_SINGLE_STEP to multi-arch
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Thu, 22 Mar 2001 21:28:26 -0500
Hello,
Attatched is a greatly simplified version of the multi-arch
SOFTWARE_SINGLE_STEP patch (I stripped out anything that wasn't directly
related).
The only thing of note is that, for the SPARC, its multi-arch status is
dropped back to partial. This is because the sparc targets havn't had
SOFTWARE_SINGLE_STEP converted to multi-arch. Before / after tests on
Solaris sparc32/sparc64 showed no regressions.
Andrew
Mon Feb 5 10:33:15 2001 Andrew Cagney <cagney@redhat.com>
* config/sparc/tm-sp64.h (GDB_MULTI_ARCH): Down grade to
GDB_MULTI_ARCH_PARTIAL from two. SOFTWARE_SINGLE_STEP is not
multi-arch.
* gdbarch.sh (SOFTWARE_SINGLE_STEP): Add.
* gdbarch.h, gdbarch.c: Re-generate.
* target.h (SOFTWARE_SINGLE_STEP_P)
(SOFTWARE_SINGLE_STEP): Delete macro definitions.
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.57
diff -p -r1.57 gdbarch.sh
*** gdbarch.sh 2001/03/21 19:47:44 1.57
--- gdbarch.sh 2001/03/23 02:21:28
*************** v:2:TARGET_FLOAT_FORMAT:const struct flo
*** 510,515 ****
--- 510,524 ----
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::::::&floatformat_unknown
f:2:CONVERT_FROM_FUNC_PTR_ADDR:CORE_ADDR:convert_from_func_ptr_addr:CORE_ADDR addr:addr:::default_convert_from_func_ptr_addr::0
+ # FIXME/cagney/2001-01-18: This should be split in two. A target method that indicates if
+ # the target needs software single step. An ISA method to implement it.
+ #
+ # FIXME/cagney/2001-01-18: This should be replaced with something that inserts breakpoints
+ # using the breakpoint system instead of blatting memory directly (as with rs6000).
+ #
+ # FIXME/cagney/2001-01-18: The logic is backwards. It should be asking if the target can
+ # single step. If not, then implement single step using breakpoints.
+ F:2:SOFTWARE_SINGLE_STEP:void:software_single_step:enum target_signal sig, int insert_breakpoints_p:sig, insert_breakpoints_p::0:0
EOF
}
Index: target.h
===================================================================
RCS file: /cvs/src/src/gdb/target.h,v
retrieving revision 1.16
diff -p -r1.16 target.h
*** target.h 2001/03/21 18:31:47 1.16
--- target.h 2001/03/23 02:21:28
*************** extern void push_remote_target (char *na
*** 1251,1262 ****
/* Imported from machine dependent code */
- #ifndef SOFTWARE_SINGLE_STEP_P
- #define SOFTWARE_SINGLE_STEP_P() 0
- #define SOFTWARE_SINGLE_STEP(sig,bp_p) \
- (internal_error (__FILE__, __LINE__, "SOFTWARE_SINGLE_STEP"), 0)
- #endif /* SOFTWARE_SINGLE_STEP_P */
-
/* Blank target vector entries are initialized to target_ignore. */
void target_ignore (void);
--- 1251,1256 ----
Index: config/sparc/tm-sp64.h
===================================================================
RCS file: /cvs/src/src/gdb/config/sparc/tm-sp64.h,v
retrieving revision 1.4
diff -p -r1.4 tm-sp64.h
*** tm-sp64.h 2001/03/06 08:21:37 1.4
--- tm-sp64.h 2001/03/23 02:21:30
***************
*** 23,29 ****
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
! #define GDB_MULTI_ARCH 2
#ifndef GDB_TARGET_IS_SPARC64
#define GDB_TARGET_IS_SPARC64 1
--- 23,29 ----
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
! #define GDB_MULTI_ARCH GDB_MULTI_ARCH_PARTIAL
#ifndef GDB_TARGET_IS_SPARC64
#define GDB_TARGET_IS_SPARC64 1