This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gdbserver] Remove unused variables


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]