From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25111 invoked by alias); 3 Jul 2014 16:24:31 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 25047 invoked by uid 89); 3 Jul 2014 16:24:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 03 Jul 2014 16:24:24 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1X2jo4-0006sA-UN from Hui_Zhu@mentor.com ; Thu, 03 Jul 2014 09:24:20 -0700 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 3 Jul 2014 09:24:20 -0700 Received: from localhost.localdomain (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.2.247.3; Thu, 3 Jul 2014 09:24:19 -0700 Message-ID: <53B583B2.1040407@mentor.com> Date: Thu, 03 Jul 2014 16:24:00 -0000 From: Hui Zhu User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Pedro Alves , gdb-patches ml Subject: Re: [PATCH] Fix gdb.base/watch-vfork.exp: Watchpoint triggers after vfork (sw) (timeout) with Linux 2.6.32 and older version References: <533D17E2.9070402@mentor.com> <538636AF.9040208@redhat.com> <539020AB.8050105@mentor.com> <53902DAA.4090602@redhat.com> <5394460F.7060201@mentor.com> In-Reply-To: <5394460F.7060201@mentor.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-07/txt/msg00082.txt.bz2 > >> >> OK with that change. >> > > Thanks for your help. Committed as > https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c077881afaedb9b74063bee992b3e472b4b6e9ca > > > Best, > Hui Hi Pedro, After this patch, I still got fail with this test in Linux 2.6.32. The cause this: signo = WSTOPSIG (status); #In linux 2.6.32, signo will be SIGSTOP. if (signo != 0 && !signal_pass_state (gdb_signal_from_host (signo))) signo = 0; #SIGSTOP will send to child and make it stop. ptrace (PTRACE_DETACH, child_pid, 0, signo); So I make a patch to fix it. Thanks, Hui 2014-07-04 Hui Zhu * linux-nat.c(linux_child_follow_fork): Add check if signo is SIGSTOP. --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -472,8 +472,9 @@ holding the child stopped. Try \"set de int signo; signo = WSTOPSIG (status); - if (signo != 0 - && !signal_pass_state (gdb_signal_from_host (signo))) + if (signo == SIGSTOP + || (signo != 0 + && !signal_pass_state (gdb_signal_from_host (signo)))) signo = 0; ptrace (PTRACE_DETACH, child_pid, 0, signo); }