* 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.
This commit is contained in:
Daniel Jacobowitz 2004-01-17 21:56:12 +00:00
parent a20cf13655
commit e74f0f0215
6 changed files with 20 additions and 66 deletions

View file

@ -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.

View file

@ -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 (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 (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. */
}
}
}

View file

@ -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

View file

@ -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);

View file

@ -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);
}

View file

@ -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