From: Andrew Cagney Date: Tue, 20 Mar 2001 18:16:28 +0000 (+0000) Subject: Change SOFTWARE_SINGLE_STEP_P into SOFTWARE_SINGLE_STEP_P(). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b0ed35899ae041089835beeb35336494bb50f1d8;p=binutils-gdb.git Change SOFTWARE_SINGLE_STEP_P into SOFTWARE_SINGLE_STEP_P(). --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 384fdfc84d2..07bd6e83783 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,19 @@ +2001-03-20 Andrew Cagney + + * target.h (SOFTWARE_SINGLE_STEP_P): Add empty parameter list. + * breakpoint.c (bpstat_stop_status): Update. + * infrun.c (handle_inferior_event): Ditto. + * mips-tdep.c (mips_dump_tdep): Ditto. + * infrun.c (resume): Ditto. + * infptrace.c (child_resume): Ditto. + * config/mips/tm-wince.h (SOFTWARE_SINGLE_STEP_P): Ditto. + * config/sh/tm-wince.h (SOFTWARE_SINGLE_STEP_P): Ditto. + * config/sparc/tm-sparc.h (SOFTWARE_SINGLE_STEP_P): Ditto. + * config/powerpc/tm-linux.h (SOFTWARE_SINGLE_STEP_P): Ditto. + * config/arm/tm-wince.h (SOFTWARE_SINGLE_STEP_P): Ditto. + * config/arc/tm-arc.h (SOFTWARE_SINGLE_STEP_P): Ditto. + * config/powerpc/tm-ppc-eabi.h (SOFTWARE_SINGLE_STEP_P): Ditto. + 2001-03-20 Andrew Cagney * config/powerpc/tm-linux.h (SOFTWARE_SINGLE_STEP): Replace abort diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 5382b15298b..5eb1fa4d93b 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -2395,7 +2395,7 @@ bpstat_stop_status (CORE_ADDR *pc, int not_a_breakpoint) char message[sizeof (message1) + 30 /* slop */ ]; /* Get the address where the breakpoint would have been. */ - bp_addr = *pc - (not_a_breakpoint && !SOFTWARE_SINGLE_STEP_P ? + bp_addr = *pc - (not_a_breakpoint && !SOFTWARE_SINGLE_STEP_P () ? 0 : DECR_PC_AFTER_BREAK); ALL_BREAKPOINTS_SAFE (b, temp) diff --git a/gdb/config/arc/tm-arc.h b/gdb/config/arc/tm-arc.h index 93ba3952ecf..8595d859b47 100644 --- a/gdb/config/arc/tm-arc.h +++ b/gdb/config/arc/tm-arc.h @@ -63,7 +63,7 @@ extern CORE_ADDR arc_skip_prologue (CORE_ADDR, int); /* We don't have a reliable single step facility. ??? We do have a cycle single step facility, but that won't work. */ -#define SOFTWARE_SINGLE_STEP_P 1 +#define SOFTWARE_SINGLE_STEP_P() 1 extern void arc_software_single_step (unsigned int, int); #define SOFTWARE_SINGLE_STEP(sig,bp_p) arc_software_single_step (sig, bp_p) diff --git a/gdb/config/arm/tm-wince.h b/gdb/config/arm/tm-wince.h index 0de5fbe096e..40e58ba2598 100644 --- a/gdb/config/arm/tm-wince.h +++ b/gdb/config/arm/tm-wince.h @@ -24,7 +24,7 @@ #include "arm/tm-arm.h" #undef SOFTWARE_SINGLE_STEP_P -#define SOFTWARE_SINGLE_STEP_P 1 +#define SOFTWARE_SINGLE_STEP_P() 1 #undef SOFTWARE_SINGLE_STEP #define SOFTWARE_SINGLE_STEP(sig, bp_p) wince_software_single_step (sig, bp_p) diff --git a/gdb/config/mips/tm-wince.h b/gdb/config/mips/tm-wince.h index 2cb7e494e11..10e2eeb5d2b 100644 --- a/gdb/config/mips/tm-wince.h +++ b/gdb/config/mips/tm-wince.h @@ -25,7 +25,7 @@ #include "mips/tm-mips.h" #undef SOFTWARE_SINGLE_STEP_P -#define SOFTWARE_SINGLE_STEP_P 1 +#define SOFTWARE_SINGLE_STEP_P() 1 #define SOFTWARE_SINGLE_STEP(sig, bp_p) wince_software_single_step (sig, bp_p) void wince_software_single_step (unsigned int, int); diff --git a/gdb/config/powerpc/tm-linux.h b/gdb/config/powerpc/tm-linux.h index 20a062b21b2..a7935c2326a 100644 --- a/gdb/config/powerpc/tm-linux.h +++ b/gdb/config/powerpc/tm-linux.h @@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #undef SOFTWARE_SINGLE_STEP #define SOFTWARE_SINGLE_STEP(p,q) internal_error (__FILE__, __LINE__, "Will never execute!") #undef SOFTWARE_SINGLE_STEP_P -#define SOFTWARE_SINGLE_STEP_P 0 +#define SOFTWARE_SINGLE_STEP_P() 0 /* Make sure nexti gets the help it needs for debugging assembly code without symbols */ diff --git a/gdb/config/powerpc/tm-ppc-eabi.h b/gdb/config/powerpc/tm-ppc-eabi.h index 2640cfca357..f0410b71356 100644 --- a/gdb/config/powerpc/tm-ppc-eabi.h +++ b/gdb/config/powerpc/tm-ppc-eabi.h @@ -26,7 +26,7 @@ #include "rs6000/tm-rs6000.h" /* except we want to allow single stepping */ #undef SOFTWARE_SINGLE_STEP_P -#define SOFTWARE_SINGLE_STEP_P 0 +#define SOFTWARE_SINGLE_STEP_P() 0 #undef DEFAULT_LR_SAVE #define DEFAULT_LR_SAVE 4 /* eabi saves LR at 4 off of SP */ diff --git a/gdb/config/rs6000/tm-rs6000.h b/gdb/config/rs6000/tm-rs6000.h index 47be046ca0f..015169aeedd 100644 --- a/gdb/config/rs6000/tm-rs6000.h +++ b/gdb/config/rs6000/tm-rs6000.h @@ -98,7 +98,7 @@ extern void aix_process_linenos (void); /* RS6000/AIX does not support PT_STEP. Has to be simulated. */ -#define SOFTWARE_SINGLE_STEP_P 1 +#define SOFTWARE_SINGLE_STEP_P() 1 extern void rs6000_software_single_step (unsigned int, int); #define SOFTWARE_SINGLE_STEP(sig,bp_p) rs6000_software_single_step (sig, bp_p) diff --git a/gdb/config/sh/tm-wince.h b/gdb/config/sh/tm-wince.h index 16816141d35..4c4869af7a3 100644 --- a/gdb/config/sh/tm-wince.h +++ b/gdb/config/sh/tm-wince.h @@ -23,7 +23,7 @@ #include "sh/tm-sh.h" #undef SOFTWARE_SINGLE_STEP_P -#define SOFTWARE_SINGLE_STEP_P 1 +#define SOFTWARE_SINGLE_STEP_P() 1 #undef SOFTWARE_SINGLE_STEP #define SOFTWARE_SINGLE_STEP(sig, bp_p) wince_software_single_step (sig, bp_p) diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h index 02b9a1a1d3e..eb2b298d79f 100644 --- a/gdb/config/sparc/tm-sparc.h +++ b/gdb/config/sparc/tm-sparc.h @@ -739,7 +739,7 @@ extern void sparc32_extract_return_value (struct type *, char[], char *); /* Sparc has no reliable single step ptrace call */ -#define SOFTWARE_SINGLE_STEP_P 1 +#define SOFTWARE_SINGLE_STEP_P() 1 extern void sparc_software_single_step (unsigned int, int); #define SOFTWARE_SINGLE_STEP(sig,bp_p) sparc_software_single_step (sig,bp_p) diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 2a40377508a..7e0d5766fbb 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,9 @@ +2001-03-20 Andrew Cagney + + * gdbint.texinfo (Target Architecture Definition): Update + definition of SOFTWARE_SINGLE_STEP_P to include empty parameter + list. + 2001-03-06 Kevin Buettner * Makefile.in, all-cfg.texi, annotate.texi, gdb.texinfo, diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo index 1710f3e97dd..bf05fec6f63 100644 --- a/gdb/doc/gdbint.texinfo +++ b/gdb/doc/gdbint.texinfo @@ -2151,7 +2151,7 @@ languages, these predicates will always see a pointer type, never an array type. All the references above to arrays being returned by value apply only to other languages. -@item SOFTWARE_SINGLE_STEP_P +@item SOFTWARE_SINGLE_STEP_P() @findex SOFTWARE_SINGLE_STEP_P Define this as 1 if the target does not have a hardware single-step mechanism. The macro @code{SOFTWARE_SINGLE_STEP} must also be defined. diff --git a/gdb/infptrace.c b/gdb/infptrace.c index 0a3e34db152..e41ca030d5c 100644 --- a/gdb/infptrace.c +++ b/gdb/infptrace.c @@ -273,7 +273,7 @@ child_resume (int pid, int step, enum target_signal signal) if (step) { - if (SOFTWARE_SINGLE_STEP_P) + if (SOFTWARE_SINGLE_STEP_P ()) internal_error (__FILE__, __LINE__, "failed internal consistency check"); /* Make sure this doesn't happen. */ else ptrace (PT_STEP, pid, (PTRACE_ARG3_TYPE) 1, diff --git a/gdb/infrun.c b/gdb/infrun.c index 92d7f615173..d2373ad8428 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -838,7 +838,7 @@ resume (int step, enum target_signal sig) if (breakpoint_here_p (read_pc ()) == permanent_breakpoint_here) SKIP_PERMANENT_BREAKPOINT (); - if (SOFTWARE_SINGLE_STEP_P && step) + if (SOFTWARE_SINGLE_STEP_P () && step) { /* Do it the hard way, w/temp breakpoints */ SOFTWARE_SINGLE_STEP (sig, 1 /*insert-breakpoints */ ); @@ -1562,7 +1562,7 @@ handle_inferior_event (struct execution_control_state *ecs) (LONGEST) ecs->ws.value.integer)); gdb_flush (gdb_stdout); target_mourn_inferior (); - singlestep_breakpoints_inserted_p = 0; /*SOFTWARE_SINGLE_STEP_P */ + singlestep_breakpoints_inserted_p = 0; /*SOFTWARE_SINGLE_STEP_P() */ stop_print_frame = 0; stop_stepping (ecs); return; @@ -1580,7 +1580,7 @@ handle_inferior_event (struct execution_control_state *ecs) target_mourn_inferior (); print_stop_reason (SIGNAL_EXITED, stop_signal); - singlestep_breakpoints_inserted_p = 0; /*SOFTWARE_SINGLE_STEP_P */ + singlestep_breakpoints_inserted_p = 0; /*SOFTWARE_SINGLE_STEP_P() */ stop_stepping (ecs); return; @@ -1821,7 +1821,7 @@ handle_inferior_event (struct execution_control_state *ecs) if (stop_signal == TARGET_SIGNAL_TRAP) { - if (SOFTWARE_SINGLE_STEP_P && singlestep_breakpoints_inserted_p) + if (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p) ecs->random_signal = 0; else if (breakpoints_inserted && breakpoint_here_p (stop_pc - DECR_PC_AFTER_BREAK)) @@ -1984,7 +1984,7 @@ handle_inferior_event (struct execution_control_state *ecs) flush_cached_frames (); } - if (SOFTWARE_SINGLE_STEP_P && singlestep_breakpoints_inserted_p) + if (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p) { /* Pull the single step breakpoints out of the target. */ SOFTWARE_SINGLE_STEP (0, 0); diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index cdd58f42ae3..05c738cb8a5 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -4470,11 +4470,8 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file) "mips_dump_tdep: SOFTWARE_SINGLE_STEP # %s\n", XSTRING (SOFTWARE_SINGLE_STEP (SIG, BP_P))); fprintf_unfiltered (file, - "mips_dump_tdep: SOFTWARE_SINGLE_STEP_P = %d\n", - SOFTWARE_SINGLE_STEP_P); - fprintf_unfiltered (file, - "mips_dump_tdep: SOFTWARE_SINGLE_STEP_P = %d\n", - SOFTWARE_SINGLE_STEP_P); + "mips_dump_tdep: SOFTWARE_SINGLE_STEP_P () = %d\n", + SOFTWARE_SINGLE_STEP_P ()); fprintf_unfiltered (file, "mips_dump_tdep: STAB_REG_TO_REGNUM # %s\n", XSTRING (STAB_REG_TO_REGNUM (REGNUM))); diff --git a/gdb/target.h b/gdb/target.h index fb4e18777a5..05f15ee0cf4 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -1395,7 +1395,7 @@ extern void push_remote_target (char *name, int from_tty); /* Imported from machine dependent code */ #ifndef SOFTWARE_SINGLE_STEP_P -#define SOFTWARE_SINGLE_STEP_P 0 +#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 */