/* Code dealing with dummy stack frames, for GDB, the GNU debugger.
- Copyright (C) 1986-2021 Free Software Foundation, Inc.
+ Copyright (C) 1986-2022 Free Software Foundation, Inc.
This file is part of GDB.
restore_infcall_suspend_state (dummy->caller_state);
- iterate_over_breakpoints ([dummy] (breakpoint* bp)
- {
- return pop_dummy_frame_bpt (bp, dummy);
- });
+ for (breakpoint *bp : all_breakpoints_safe ())
+ if (pop_dummy_frame_bpt (bp, dummy))
+ break;
/* restore_infcall_control_state frees inf_state,
all that remains is to pop *dummy_ptr. */
/* Use the regcache_cooked_read() method so that it, on the fly,
constructs either a raw or pseudo register from the raw
register cache. */
- cache->prev_regcache->cooked_read (regnum,
- value_contents_writeable (reg_val));
+ cache->prev_regcache->cooked_read
+ (regnum, value_contents_writeable (reg_val).data ());
return reg_val;
}
const struct frame_unwind dummy_frame_unwind =
{
+ "dummy",
DUMMY_FRAME,
default_frame_unwind_stop_reason,
dummy_frame_this_id,
struct dummy_frame *s;
for (s = dummy_frame_stack; s != NULL; s = s->next)
- {
- gdb_print_host_address (s, file);
- fprintf_unfiltered (file, ":");
- fprintf_unfiltered (file, " id=%s", s->id.id.to_string ().c_str ());
- fprintf_unfiltered (file, ", ptid=%s",
- target_pid_to_str (s->id.thread->ptid).c_str ());
- fprintf_unfiltered (file, "\n");
- }
+ gdb_printf (file, "%s: id=%s, ptid=%s\n",
+ host_address_to_string (s),
+ s->id.id.to_string ().c_str (),
+ s->id.thread->ptid.to_string ().c_str ());
}
static void