Delete DECR_PC_AFTER_HW_BREAK and SHIFT_INST_REGS

Daniel Jacobowitz drow@mvista.com
Sat Jan 17 19:33:00 GMT 2004


Neither of these is defined any longer.  I think at least SHIFT_INST_REGS
went out with the m88k port.  Unless someone objects, I'll delete them in a
few days.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

2004-01-17  Daniel Jacobowitz  <drow@mvista.com>

	* breakpoint.c (must_shift_inst_regs): Delete.
	(bpstat_stop_status): Delete references to DECR_PC_AFTER_HW_BREAK
	and SHIFT_INST_REGS.
	* infcmd.c (step_1, step_1_continuation): Delete references to
	SHIFT_INST_REGS.
	* infrun.c (keep_going): Likewise.
	* target.h (DECR_PC_AFTER_HW_BREAK): Don't define.
	* config/i386/nm-i386.h (DECR_PC_AFTER_HW_BREAK): Likewise.

2004-01-17  Daniel Jacobowitz  <drow@mvista.com>

	* gdbint.texinfo (DECR_PC_AFTER_HW_BREAK): Don't document.

Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.148
diff -u -p -r1.148 breakpoint.c
--- breakpoint.c	22 Dec 2003 03:43:19 -0000	1.148
+++ breakpoint.c	17 Jan 2004 19:29:39 -0000
@@ -1,8 +1,8 @@
 /* Everything about breakpoints, for GDB.
 
    Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
-   1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
-   Foundation, Inc.
+   1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+   Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -244,16 +244,6 @@ static int overlay_events_enabled;
 	     B ? (TMP=B->next, 1): 0;	\
 	     B = TMP)
 
-/* True if SHIFT_INST_REGS defined, false otherwise.  */
-
-int must_shift_inst_regs =
-#if defined(SHIFT_INST_REGS)
-1
-#else
-0
-#endif
- ;
-
 /* True if breakpoint hit counts should be displayed in breakpoint info.  */
 
 int show_breakpoint_hit_counts = 1;
@@ -2622,7 +2612,7 @@ bpstat_stop_status (CORE_ADDR *pc, int n
 
     if (b->type == bp_hardware_breakpoint)
       {
-	if (b->loc->address != (*pc - DECR_PC_AFTER_HW_BREAK))
+	if (b->loc->address != *pc)
 	  continue;
 	if (overlay_debugging		/* unmapped overlay section */
 	    && section_is_overlay (b->loc->section) 
@@ -2882,24 +2872,12 @@ bpstat_stop_status (CORE_ADDR *pc, int n
 
   if (real_breakpoint && bs)
     {
-      if (bs->breakpoint_at->type == bp_hardware_breakpoint)
-	{
-	  if (DECR_PC_AFTER_HW_BREAK != 0)
-	    {
-	      *pc = *pc - DECR_PC_AFTER_HW_BREAK;
-	      write_pc (*pc);
-	    }
-	}
-      else
+      if (bs->breakpoint_at->type != bp_hardware_breakpoint)
 	{
-	  if (DECR_PC_AFTER_BREAK != 0 || must_shift_inst_regs)
+	  if (DECR_PC_AFTER_BREAK != 0)
 	    {
 	      *pc = bp_addr;
-#if defined (SHIFT_INST_REGS)
-	      SHIFT_INST_REGS ();
-#else /* No SHIFT_INST_REGS.  */
 	      write_pc (bp_addr);
-#endif /* No SHIFT_INST_REGS.  */
 	    }
 	}
     }
Index: infcmd.c
===================================================================
RCS file: /cvs/src/src/gdb/infcmd.c,v
retrieving revision 1.99
diff -u -p -r1.99 infcmd.c
--- infcmd.c	22 Nov 2003 22:15:23 -0000	1.99
+++ infcmd.c	17 Jan 2004 19:29:39 -0000
@@ -1,6 +1,6 @@
 /* Memory-access and commands for "inferior" process, for GDB.
    Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
-   1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+   1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -661,13 +661,6 @@ which has no line number information.\n"
 
 	  if (!stop_step)
 	    break;
-
-	  /* FIXME: On nexti, this may have already been done (when we hit the
-	     step resume break, I think).  Probably this should be moved to
-	     wait_for_inferior (near the top).  */
-#if defined (SHIFT_INST_REGS)
-	  SHIFT_INST_REGS ();
-#endif
 	}
 
       if (!single_inst || skip_subroutines)
@@ -702,15 +695,7 @@ step_1_continuation (struct continuation
   count            = arg->next->next->data.integer;
 
   if (stop_step)
-    {
-      /* FIXME: On nexti, this may have already been done (when we hit the
-	 step resume break, I think).  Probably this should be moved to
-	 wait_for_inferior (near the top).  */
-#if defined (SHIFT_INST_REGS)
-      SHIFT_INST_REGS ();
-#endif
-      step_once (skip_subroutines, single_inst, count - 1);
-    }
+    step_once (skip_subroutines, single_inst, count - 1);
   else
     if (!single_inst || skip_subroutines)
       do_exec_cleanups (ALL_CLEANUPS);
Index: infrun.c
===================================================================
RCS file: /cvs/src/src/gdb/infrun.c,v
retrieving revision 1.127
diff -u -p -r1.127 infrun.c
--- infrun.c	13 Jan 2004 21:31:43 -0000	1.127
+++ infrun.c	17 Jan 2004 19:29:39 -0000
@@ -2943,17 +2943,6 @@ keep_going (struct execution_control_sta
       if (stop_signal == TARGET_SIGNAL_TRAP && !signal_program[stop_signal])
 	stop_signal = TARGET_SIGNAL_0;
 
-#ifdef SHIFT_INST_REGS
-      /* I'm not sure when this following segment applies.  I do know,
-         now, that we shouldn't rewrite the regs when we were stopped
-         by a random signal from the inferior process.  */
-      /* FIXME: Shouldn't this be based on the valid bit of the SXIP?
-         (this is only used on the 88k).  */
-
-      if (!bpstat_explains_signal (stop_bpstat)
-	  && (stop_signal != TARGET_SIGNAL_CHLD) && !stopped_by_random_signal)
-	SHIFT_INST_REGS ();
-#endif /* SHIFT_INST_REGS */
 
       resume (currently_stepping (ecs), stop_signal);
     }
Index: target.h
===================================================================
RCS file: /cvs/src/src/gdb/target.h,v
retrieving revision 1.54
diff -u -p -r1.54 target.h
--- target.h	14 Nov 2003 20:49:23 -0000	1.54
+++ target.h	17 Jan 2004 19:29:40 -0000
@@ -1,7 +1,7 @@
 /* Interface between GDB and target environments, including files and processes
 
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
 
    Contributed by Cygnus Support.  Written by John Gilmore.
 
@@ -1082,13 +1082,6 @@ extern void (*target_new_objfile_hook) (
 #ifndef target_stopped_data_address
 #define target_stopped_data_address() \
     (*current_target.to_stopped_data_address) ()
-#endif
-
-/* If defined, then we need to decr pc by this much after a hardware break-
-   point.  Presumably this overrides DECR_PC_AFTER_BREAK...  */
-
-#ifndef DECR_PC_AFTER_HW_BREAK
-#define DECR_PC_AFTER_HW_BREAK 0
 #endif
 
 /* Sometimes gdb may pick up what appears to be a valid target address
Index: config/i386/nm-i386.h
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/nm-i386.h,v
retrieving revision 1.4
diff -u -p -r1.4 nm-i386.h
--- config/i386/nm-i386.h	24 Feb 2003 21:56:51 -0000	1.4
+++ config/i386/nm-i386.h	17 Jan 2004 19:29:40 -0000
@@ -1,5 +1,5 @@
 /* Native macro definitions for GDB on an Intel i[3456]86.
-   Copyright 2001 Free Software Foundation, Inc.
+   Copyright 2001, 2004 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -112,8 +112,6 @@ extern int  i386_remove_hw_breakpoint (C
 
 #define target_remove_hw_breakpoint(addr, shadow) \
   i386_remove_hw_breakpoint (addr, shadow)
-
-#define DECR_PC_AFTER_HW_BREAK 0
 
 /* child_post_startup_inferior used to
    reset all debug registers by calling i386_cleanup_dregs ().  */ 
Index: doc/gdbint.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v
retrieving revision 1.179
diff -u -p -r1.179 gdbint.texinfo
--- doc/gdbint.texinfo	13 Jan 2004 17:06:37 -0000	1.179
+++ doc/gdbint.texinfo	17 Jan 2004 19:29:41 -0000
@@ -480,13 +480,6 @@ two macros can use them for their intern
 If the inferior has some watchpoint that triggered, return the address
 associated with that watchpoint.  Otherwise, return zero.
 
-@findex DECR_PC_AFTER_HW_BREAK
-@item DECR_PC_AFTER_HW_BREAK
-If defined, @value{GDBN} decrements the program counter by the value
-of @code{DECR_PC_AFTER_HW_BREAK} after a hardware break-point.  This
-overrides the value of @code{DECR_PC_AFTER_BREAK} when a breakpoint
-that breaks is a hardware-assisted breakpoint.
-
 @findex HAVE_STEPPABLE_WATCHPOINT
 @item HAVE_STEPPABLE_WATCHPOINT
 If defined to a non-zero value, it is not necessary to disable a
@@ -3160,10 +3153,6 @@ non-standard form.
 Define this to be the amount by which to decrement the PC after the
 program encounters a breakpoint.  This is often the number of bytes in
 @code{BREAKPOINT}, though not always.  For most targets this value will be 0.
-
-@item DECR_PC_AFTER_HW_BREAK
-@findex DECR_PC_AFTER_HW_BREAK
-Similarly, for hardware breakpoints.
 
 @item DISABLE_UNSETTABLE_BREAK (@var{addr})
 @findex DISABLE_UNSETTABLE_BREAK



More information about the Gdb-patches mailing list