From: Doug Evans Date: Fri, 12 Dec 2008 23:14:28 +0000 (+0000) Subject: * linux-low.c (linux_wait_for_process): Don't clobber current_inferior X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=896c7fbbd4caa95187e54d276eb6b40e5c62a174;p=binutils-gdb.git * linux-low.c (linux_wait_for_process): Don't clobber current_inferior in debugging printf. --- diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 3eecdd0857a..9448e714bd1 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,5 +1,8 @@ 2008-12-12 Doug Evans + * linux-low.c (linux_wait_for_process): Don't clobber current_inferior + in debugging printf. + * linux-low.c (handle_extended_wait): Simplify, use my_waitpid. 2008-12-09 Doug Evans diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 4a6acd8f3bc..24ac4844d0c 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -642,11 +642,13 @@ retry: if (debug_threads && WIFSTOPPED (*wstatp)) { + struct thread_info *saved_inferior = current_inferior; current_inferior = (struct thread_info *) find_inferior_id (&all_threads, (*childp)->lwpid); /* For testing only; i386_stop_pc prints out a diagnostic. */ if (the_low_target.get_pc != NULL) get_stop_pc (); + current_inferior = saved_inferior; } }