diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2007-09-10 18:49:26 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2007-09-10 18:49:26 +0000 |
commit | 2eddd513bffe2d99bc8ccf1c4c1aabf80ec4d441 (patch) | |
tree | 41c3f39c8d5005436131a5262c28ec701050ce9a /gdb/thread.c | |
parent | 0d4c496a650a646af592f825dcfa0369cf5d267a (diff) | |
download | gdb-2eddd513bffe2d99bc8ccf1c4c1aabf80ec4d441.tar.gz |
* infrun.c (stepping_past_breakpoint): New global variable.
(stepping_past_breakpoint_ptid): Likewise.
(prepare_to_proceed): Add STEP parameter. Do not check for Ctrl-C.
Only switch threads if we need to single-step over a breakpoint hit
in the previously selected thread. If stepping, remember previous
thread to switch back to in STEPPING_PAST_BREAKPOINT[_PTID]. Call
switch_to_thread instead of copying its contents.
(proceed): Pass STEP to prepare_to_proceed. Always set ONEPROC if
prepare_to_proceed returns true.
(init_wait_for_inferior): Reset STEPPING_PAST_BREAKPOINT.
(context_switch): Call switch_to_thread.
(handle_inferior_event): Switch back to previous thread if requested
in STEPPING_PAST_BREAKPOINT[_PTID] by prepare_to_proceed.
* gdbthread.h (switch_to_thread): Add prototype.
* thread.c (switch_to_thread): Make global.
Diffstat (limited to 'gdb/thread.c')
-rw-r--r-- | gdb/thread.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/thread.c b/gdb/thread.c index 8853e9105b1..563d18a8afa 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -59,7 +59,6 @@ static int thread_alive (struct thread_info *); static void info_threads_command (char *, int); static void thread_apply_command (char *, int); static void restore_current_thread (ptid_t); -static void switch_to_thread (ptid_t ptid); static void prune_threads (void); static struct cleanup *make_cleanup_restore_current_thread (ptid_t, struct frame_id); @@ -452,7 +451,7 @@ info_threads_command (char *arg, int from_tty) /* Switch from one thread to another. */ -static void +void switch_to_thread (ptid_t ptid) { if (ptid_equal (ptid, inferior_ptid)) |