diff options
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 9f9cb8a..ff2a53a 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -15232,6 +15232,33 @@ insert_single_step_breakpoint (struct gdbarch *gdbarch, update_global_location_list (UGLL_INSERT); } +/* Insert single step breakpoints according to the current state. */ + +int +insert_single_step_breakpoints (struct gdbarch *gdbarch) +{ + struct frame_info *frame = get_current_frame (); + VEC (CORE_ADDR) * next_pcs; + + next_pcs = gdbarch_software_single_step (gdbarch, frame); + + if (next_pcs != NULL) + { + int i; + CORE_ADDR pc; + struct address_space *aspace = get_frame_address_space (frame); + + for (i = 0; VEC_iterate (CORE_ADDR, next_pcs, i, pc); i++) + insert_single_step_breakpoint (gdbarch, aspace, pc); + + VEC_free (CORE_ADDR, next_pcs); + + return 1; + } + else + return 0; +} + /* See breakpoint.h. */ int |