From b5aff26825abb88d44d71392f759c0a89e979285 Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Tue, 1 Mar 1994 00:15:07 +0000 Subject: * mips-tdep.c (mips_step_skips_delay), config/mips/tm-mips.h (STEP_SKIPS_DELAY): Added. * infrun.c (proceed) [STEP_SKIPS_DELAY]: Check for a breakpoint in the delay slot. --- gdb/infrun.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gdb/infrun.c') diff --git a/gdb/infrun.c b/gdb/infrun.c index ef9b826..146621c 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -280,6 +280,15 @@ proceed (addr, siggnal, step) if (breakpoint_here_p (read_pc ())) oneproc = 1; + +#ifdef STEP_SKIPS_DELAY + /* Check breakpoint_here_p first, because breakpoint_here_p is fast + (it just checks internal GDB data structures) and STEP_SKIPS_DELAY + is slow (it needs to read memory from the target). */ + if (breakpoint_here_p (read_pc () + 4) + && STEP_SKIPS_DELAY (read_pc ())) + oneproc = 1; +#endif /* STEP_SKIPS_DELAY */ } else write_pc (addr); -- cgit v1.1