This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix linux-nat.c {,lp->}status typo
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Date: Tue, 20 Jul 2010 13:22:28 +0100
- Subject: Re: [patch] Fix linux-nat.c {,lp->}status typo
- References: <20100718145110.GA16697@host1.dyn.jankratochvil.net>
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