* breakpoint.c, breakpoint.h (breakpoint_init_inferior): New function
[deliverable/binutils-gdb.git] / gdb / infrun.c
index e7d2c4221ea55eeab66f643edede2267339f7259..37447334eb0d5c34857e02a02019c107191de5fc 100644 (file)
@@ -283,6 +283,14 @@ resume (step, sig)
   struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0);
   QUIT;
 
+#ifdef CANNOT_STEP_BREAKPOINT
+  /* Most targets can step a breakpoint instruction, thus executing it
+     normally.  But if this one cannot, just continue and we will hit
+     it anyway.  */
+  if (step && breakpoints_inserted && breakpoint_here_p (read_pc ()))
+    step = 0;
+#endif
+
 #ifdef NO_SINGLE_STEP
   if (step) {
     single_step(sig);  /* Do it the hard way, w/temp breakpoints */
@@ -439,7 +447,7 @@ init_wait_for_inferior ()
 
   trap_expected_after_continue = 0;
   breakpoints_inserted = 0;
-  mark_breakpoints_out ();
+  breakpoint_init_inferior ();
   stop_signal = 0;             /* Don't confuse first call to proceed(). */
 }
 
@@ -1255,6 +1263,8 @@ step_into_function:
          /* 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 != SIGCLD) 
This page took 0.02372 seconds and 4 git commands to generate.