From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10615 invoked by alias); 25 Oct 2011 17:37:31 -0000 Received: (qmail 10411 invoked by uid 22791); 25 Oct 2011 17:37:28 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 25 Oct 2011 17:37:03 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9PHawV1014883 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 25 Oct 2011 13:36:58 -0400 Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p9PHauoL006248; Tue, 25 Oct 2011 13:36:57 -0400 Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500 oleg@redhat.com; Tue, 25 Oct 2011 19:32:51 +0200 (CEST) Date: Tue, 25 Oct 2011 17:38:00 -0000 From: Oleg Nesterov To: Pedro Alves Cc: Jan Kratochvil , gdb-patches@sourceware.org, Tom Tromey Subject: Re: FYI: fix 2 tests when glibc debuginfo is installed Message-ID: <20111025173249.GA23231@redhat.com> References: <201110142241.46746.pedro@codesourcery.com> <20111015144758.GA5011@redhat.com> <201110251755.12986.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201110251755.12986.pedro@codesourcery.com> User-Agent: Mutt/1.5.18 (2008-05-17) 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 X-SW-Source: 2011-10/txt/msg00666.txt.bz2 On 10/25, Pedro Alves wrote: > > On Saturday 15 October 2011 15:47:58, Oleg Nesterov wrote: > > On 10/14, Pedro Alves wrote: > > > > > > On Friday 14 October 2011 22:25:10, Jan Kratochvil wrote: > > > > On Fri, 14 Oct 2011 23:19:09 +0200, Pedro Alves wrote: > > > > > On Friday 14 October 2011 20:37:05, Jan Kratochvil wrote: > > > > > > thanks; although these testcases are broken anyway, they should be updated for > > > > > > Linux kernels 3.1.x which always keep inferior stopped if it was stopped > > > > > > during PTRACE_ATTACH; probably to XFAIL older kernels. > > > > > > > > > > Urgh. Even if you SIGCONT the process before PTRACE_DETACH? > > > > > > > > Yes. But I do not think it is problem, one can SIGCONT it safely after > > > > PTRACE_DETACH. Just it may be (T)-stopped for a moment but why not. > > > > Confused... SIGCONT should work even the task is traced. It won't > > resume the tracee, but it should change its (internal) state to > > mark it as not-stopped. > > Thanks. Okay, so I take it what really happens is that PTRACE_ATTACH no > longer messes with job control, Well, PTRACE_ATTACH was not really changed in this sense. And it still sends SIGSTOP. You can use PTRACE_SEIZE. But I guess this is off-topic, > and that gdb will have to > `kill -SIGCONT' the inferior itself if it wants e.g., inferior > function calls to work after attaching to a stopped process Why? PTRACE_CONT/etc should work. The tracee will be resumed, stopped or not. But, compared to the old kernels, the tracee "remembers" the fact it was stopped, and it will stop again after DETACH. Unless SIGCONT in between. Or I misunderstood? Oleg.