aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2004-01-17 21:56:12 +0000
committerDaniel Jacobowitz <drow@false.org>2004-01-17 21:56:12 +0000
commite74f0f0215a82ede8ebc705f84dde6aa5196c277 (patch)
tree17a2d67e7bb894cbf326ddf7291208272c0fb592
parenta20cf136551e8eb434434cad4fc6c56e970b9544 (diff)
downloadgdb-e74f0f0215a82ede8ebc705f84dde6aa5196c277.zip
gdb-e74f0f0215a82ede8ebc705f84dde6aa5196c277.tar.gz
gdb-e74f0f0215a82ede8ebc705f84dde6aa5196c277.tar.bz2
* 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.
-rw-r--r--gdb/ChangeLog11
-rw-r--r--gdb/breakpoint.c32
-rw-r--r--gdb/config/i386/nm-i386.h4
-rw-r--r--gdb/infcmd.c19
-rw-r--r--gdb/infrun.c11
-rw-r--r--gdb/target.h9
6 files changed, 20 insertions, 66 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 586830b..5120f77 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,14 @@
+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 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS): Delete.
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 6a17368..19e8454 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -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 not_a_sw_breakpoint)
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 not_a_sw_breakpoint)
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. */
}
}
}
diff --git a/gdb/config/i386/nm-i386.h b/gdb/config/i386/nm-i386.h
index 97a7053..88eacc8 100644
--- a/gdb/config/i386/nm-i386.h
+++ b/gdb/config/i386/nm-i386.h
@@ -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.
@@ -113,8 +113,6 @@ extern int i386_remove_hw_breakpoint (CORE_ADDR addr, void *shadow);
#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 (). */
#define CHILD_POST_STARTUP_INFERIOR
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index d4510e4..483937c 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -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", name);
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_arg *arg)
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);
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 71c2845..11db680 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -2943,17 +2943,6 @@ keep_going (struct execution_control_state *ecs)
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);
}
diff --git a/gdb/target.h b/gdb/target.h
index 21956df..8894ac6 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -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.
@@ -1084,13 +1084,6 @@ extern void (*target_new_objfile_hook) (struct objfile *);
(*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
from a minimal symbol, but the value really means, essentially,
"This is an index into a table which is populated when the inferior