@@ -68,6 +68,7 @@
#include "format.h"
#include "thread-fsm.h"
#include "tid-parse.h"
+#include "inline-frame.h"
/* readline include files */
#include "readline/readline.h"
@@ -5359,6 +5360,7 @@ bpstat_check_breakpoint_conditions (bpstat bs, ptid_t ptid)
}
CATCH (ex, RETURN_MASK_ALL)
{
+ clear_inline_frame_state (ptid);
exception_fprintf (gdb_stderr, ex,
"Error in testing breakpoint condition:\n");
}
@@ -5864,6 +5864,12 @@ handle_signal_stop (struct execution_control_state *ecs)
stop_print_frame = 1;
stopped_by_random_signal = 0;
+ /* See if there is a breakpoint/watchpoint/catchpoint/etc. that
+ handles this event. */
+ ecs->event_thread->control.stop_bpstat
+ = bpstat_stop_status (get_regcache_aspace (get_current_regcache ()),
+ stop_pc, ecs->ptid, &ecs->ws);
+
/* Hide inlined functions starting here, unless we just performed stepi or
nexti. After stepi and nexti, always show the innermost frame (not any
inline function call sites). */
@@ -5894,7 +5900,12 @@ handle_signal_stop (struct execution_control_state *ecs)
ecs->event_thread->prev_pc,
&ecs->ws)))
{
- skip_inline_frames (ecs->ptid);
+ struct breakpoint *bpt = NULL;
+
+ if (ecs->event_thread->control.stop_bpstat != NULL)
+ bpt = ecs->event_thread->control.stop_bpstat->breakpoint_at;
+
+ skip_inline_frames (ecs->ptid, bpt);
/* Re-fetch current thread's frame in case that invalidated
the frame cache. */
@@ -5939,12 +5950,6 @@ handle_signal_stop (struct execution_control_state *ecs)
}
}
- /* See if there is a breakpoint/watchpoint/catchpoint/etc. that
- handles this event. */
- ecs->event_thread->control.stop_bpstat
- = bpstat_stop_status (get_regcache_aspace (get_current_regcache ()),
- stop_pc, ecs->ptid, &ecs->ws);
-
/* Following in case break condition called a
function. */
stop_print_frame = 1;
*2 The more "complex," safer solution (for illustration only)
@@ -5863,6 +5863,7 @@ handle_signal_stop (struct execution_control_state *ecs)
ecs->event_thread->control.stop_step = 0;
stop_print_frame = 1;
stopped_by_random_signal = 0;
+ bpstat stop_chain = NULL;
/* Hide inlined functions starting here, unless we just performed stepi or
nexti. After stepi and nexti, always show the innermost frame (not any
@@ -5894,7 +5895,13 @@ handle_signal_stop (struct execution_control_state *ecs)
ecs->event_thread->prev_pc,
&ecs->ws)))
{
- skip_inline_frames (ecs->ptid);
+ struct breakpoint *bpt = NULL;
+
+ stop_chain = build_bpstat_chain (aspace, stop_pc, &ecs->ws);
+ if (stop_chain != NULL)
+ bpt = stop_chain->breakpoint_at;
+
+ skip_inline_frames (ecs->ptid, bpt);
/* Re-fetch current thread's frame in case that invalidated
the frame cache. */
@@ -5943,7 +5950,7 @@ handle_signal_stop (struct execution_control_state *ecs)
handles this event. */
ecs->event_thread->control.stop_bpstat
= bpstat_stop_status (get_regcache_aspace (get_current_regcache ()),
- stop_pc, ecs->ptid, &ecs->ws);
+ stop_pc, ecs->ptid, &ecs->ws, stop_chain);
/* Following in case break condition called a
function. */