-/* Skip all inlined functions whose call sites are at the current PC.
- Frames for the hidden functions will not appear in the backtrace until the
- user steps into them. */
+/* Loop over the stop chain and determine if execution stopped in an
+ inlined frame because of a user breakpoint set at FRAME_BLOCK. */
+
+static bool
+stopped_by_user_bp_inline_frame (const block *frame_block, bpstat stop_chain)
+{
+ for (bpstat s = stop_chain; s != NULL; s = s->next)
+ {
+ struct breakpoint *bpt = s->breakpoint_at;
+
+ if (bpt != NULL && user_breakpoint_p (bpt))
+ {
+ bp_location *loc = s->bp_location_at;
+ enum bp_loc_type t = loc->loc_type;
+
+ if (t == bp_loc_software_breakpoint
+ || t == bp_loc_hardware_breakpoint)
+ {
+ /* If the location has a function symbol, check whether
+ the frame was for that inlined function. If it has
+ no function symbol, then assume it is. I.e., default
+ to presenting the stop at the innermost inline
+ function. */
+ if (loc->symbol == nullptr
+ || frame_block == SYMBOL_BLOCK_VALUE (loc->symbol))
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
+/* See inline-frame.h. */