diff options
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index e0e9ffa..9d3e1b7 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -93,6 +93,8 @@ static void insert_step_resume_breakpoint_at_caller (const frame_info_ptr &); static void insert_longjmp_resume_breakpoint (struct gdbarch *, CORE_ADDR); +static bool maybe_software_singlestep (struct gdbarch *gdbarch); + static void resume (gdb_signal sig); static void wait_for_inferior (inferior *inf); @@ -2357,6 +2359,23 @@ set_schedlock_func (const char *args, int from_tty, struct cmd_list_element *c) process. */ bool sched_multi = false; +/* Try to setup for software single stepping. Return true if target_resume() + should use hardware single step. + + GDBARCH the current gdbarch. */ + +static bool +maybe_software_singlestep (struct gdbarch *gdbarch) +{ + bool hw_step = true; + + if (execution_direction == EXEC_FORWARD + && gdbarch_software_single_step_p (gdbarch)) + hw_step = !insert_single_step_breakpoints (gdbarch); + + return hw_step; +} + /* See infrun.h. */ ptid_t |