else
within_current_scope = false;
}
+ CORE_ADDR pc_before_check = get_frame_pc (get_selected_frame (nullptr));
if (within_current_scope)
{
try
exception_fprintf (gdb_stderr, ex,
"Error in testing condition for breakpoint %d:\n",
b->number);
+
+ /* If the pc value changed as a result of evaluating the
+ condition then we probably stopped within an inferior
+ function call due to some unexpected stop, e.g. the thread
+ hit another breakpoint, or the thread received an
+ unexpected signal. In this case we don't want to also
+ print the information about this breakpoint. */
+ CORE_ADDR pc_after_check
+ = get_frame_pc (get_selected_frame (nullptr));
+ if (pc_before_check != pc_after_check)
+ bs->print = 0;
}
}
else
"The program being debugged stopped while in a function called from GDB\\." \
"Evaluation of the expression containing the function" \
"\\(func_bp\\) will be abandoned\\." \
- "When the function is done executing, GDB will silently stop\\." \
- "" \
- "Breakpoint ${bp_1_num}, \[^\r\n\]+" \
- "${::decimal}\\s+\[^\r\n\]+Second breakpoint\[^\r\n\]+"]
+ "When the function is done executing, GDB will silently stop\\."]
}
# Start GDB according to ASYNC_P and NON_STOP_P, then call an inferior
"${::hex} in func_segfault \\(\\) at \[^\r\n\]+:${::segv_line}" \
"${::decimal}\\s+\[^\r\n\]+Segfault here\[^\r\n\]+" \
"Error in testing condition for breakpoint ${bp_1_num}:" \
- "The program being debugged stopped while in a function called from GDB\\." \
+ "The program being debugged was signaled while in a function called from GDB\\." \
+ "GDB remains in the frame where the signal was received\\." \
+ "To change this behavior use \"set unwindonsignal on\"\\." \
"Evaluation of the expression containing the function" \
"\\(func_segfault\\) will be abandoned\\." \
- "When the function is done executing, GDB will silently stop\\." \
- "" \
- "Breakpoint ${bp_1_num}, \[^\r\n\]+" \
- "${::decimal}\\s+\[^\r\n\]+Segfault here\[^\r\n\]+"]
+ "When the function is done executing, GDB will silently stop\\."]
}
# Start GDB according to ASYNC_P and NON_STOP_P, then call an inferior
"Program received signal SIGSEGV, Segmentation fault\\." \
"${::hex} in func_segfault \\(\\) at \[^\r\n\]+:${::segv_line}" \
"${::decimal}\\s+\[^\r\n\]+Segfault here\[^\r\n\]+" \
- "The program being debugged stopped while in a function called from GDB\\." \
+ "The program being debugged was signaled while in a function called from GDB\\." \
+ "GDB remains in the frame where the signal was received\\." \
+ "To change this behavior use \"set unwindonsignal on\"\\." \
"Evaluation of the expression containing the function" \
"\\(func_segfault\\) will be abandoned\\." \
"When the function is done executing, GDB will silently stop\\."]