This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [gdbserver] Remove unused variables
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Yao Qi <yao at codesourcery dot com>
- Date: Mon, 6 Sep 2010 10:46:05 +0100
- Subject: Re: [gdbserver] Remove unused variables
- References: <4C7F7273.6090708@codesourcery.com>
On Thursday 02 September 2010 10:46:27, Yao Qi wrote:
> Hi,
> This patch is to remove unused variables in order to fix some build
> failures I find today on GDB CVS HEAD.
(...)
Most of the patch is okay, except:
> if (debug_threads)
> fprintf (stderr, "lk_1: killing lwp %ld, for pid: %d\n",
> @@ -1201,9 +1199,6 @@ linux_fast_tracepoint_collecting (struct
> static int
> maybe_move_out_of_jump_pad (struct lwp_info *lwp, int *wstat)
> {
> - struct thread_info *saved_inferior;
> -
> - saved_inferior = current_inferior;
> current_inferior = get_lwp_thread (lwp);
... this bit, that revealed a bug. saved_inferior should be used. Please
add a "current_inferior = saved_inferior;" statement before
every return path in this function instead. Bonus points
if you do that in a separate patch from the "remove unused
variables" one.
--
Pedro Alves