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: [patch] Fix linux-nat.c {,lp->}status typo


On Sunday 18 July 2010 15:51:12, Jan Kratochvil wrote:

> while reading the code I found this suspicious code, IMO a typo.
> 
>               if (WIFSTOPPED (lp->status))
>                 {
>                   if (WSTOPSIG (lp->status) != SIGSTOP)
> 		  [...]
>                 }
>               else if (WIFEXITED (status) || WIFSIGNALED (status))
> 	      [...]
> 

> No regressions on {x86_64,x86_64-m32,i686}-fedora12-linux-gnu.
> (I haven't tried to find an impact of this bug.)

In practice, status == lp->status at this point for !WIFSTOPPED,
so there should be no impact.

> 2010-07-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
> 
> 	* linux-nat.c (linux_nat_wait_1): Reset STATUS after calling
> 	linux_nat_wait_1.  Use always LP->STATUS afterwards.

Okay, thanks.

-- 
Pedro Alves


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