diff options
author | Andrew Cagney <cagney@redhat.com> | 2001-03-24 02:07:49 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2001-03-24 02:07:49 +0000 |
commit | 64c4637f9265ae06f5f88887afe243ac33392992 (patch) | |
tree | 87cdc3e74baed364dd32523972ad2f1a74954f85 /gdb/gdbarch.h | |
parent | 61a0eb5b8e81215b3d3d7be207315572af3fe8a8 (diff) | |
download | gdb-64c4637f9265ae06f5f88887afe243ac33392992.zip gdb-64c4637f9265ae06f5f88887afe243ac33392992.tar.gz gdb-64c4637f9265ae06f5f88887afe243ac33392992.tar.bz2 |
* 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.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r-- | gdb/gdbarch.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index a9f0e15..34891a4 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -1489,6 +1489,46 @@ extern void set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, gdb #endif #endif +/* 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. */ + +#if defined (SOFTWARE_SINGLE_STEP) +/* Legacy for systems yet to multi-arch SOFTWARE_SINGLE_STEP */ +#if !defined (SOFTWARE_SINGLE_STEP_P) +#define SOFTWARE_SINGLE_STEP_P() (1) +#endif +#endif + +/* Default predicate for non- multi-arch targets. */ +#if (!GDB_MULTI_ARCH) && !defined (SOFTWARE_SINGLE_STEP_P) +#define SOFTWARE_SINGLE_STEP_P() (0) +#endif + +extern int gdbarch_software_single_step_p (struct gdbarch *gdbarch); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SOFTWARE_SINGLE_STEP_P) +#define SOFTWARE_SINGLE_STEP_P() (gdbarch_software_single_step_p (current_gdbarch)) +#endif + +/* Default (function) for non- multi-arch platforms. */ +#if (!GDB_MULTI_ARCH) && !defined (SOFTWARE_SINGLE_STEP) +#define SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p) (internal_error (__FILE__, __LINE__, "SOFTWARE_SINGLE_STEP"), 0) +#endif + +typedef void (gdbarch_software_single_step_ftype) (enum target_signal sig, int insert_breakpoints_p); +extern void gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p); +extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_software_single_step_ftype *software_single_step); +#if GDB_MULTI_ARCH +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SOFTWARE_SINGLE_STEP) +#define SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p) (gdbarch_software_single_step (current_gdbarch, sig, insert_breakpoints_p)) +#endif +#endif + extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch); |