From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 106894 invoked by alias); 22 Jul 2016 15:35:34 -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 106466 invoked by uid 89); 22 Jul 2016 15:35:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=1579, check-in, H*M:ad54, 2009 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 22 Jul 2016 15:35:23 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B5A30811DF for ; Fri, 22 Jul 2016 15:35:22 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u6MFZLPP009331; Fri, 22 Jul 2016 11:35:22 -0400 Subject: Re: [patch] Fix for newer kernels with: t (tracing stop) To: Jan Kratochvil , gdb-patches@sourceware.org References: <20160604122904.GA11651@host1.jankratochvil.net> From: Pedro Alves Message-ID: <3132f4e9-8695-ad54-e0ef-c577dbdaba39@redhat.com> Date: Fri, 22 Jul 2016 15:35:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <20160604122904.GA11651@host1.jankratochvil.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-07/txt/msg00300.txt.bz2 On 06/04/2016 01:29 PM, Jan Kratochvil wrote: > Hi, > > I did provide wrong ptrace data which should fail on their write. > error (_("Unexpected error setting hardware debug registers")); > But GDB did not print that error, only inferior did hang, because the data was > not written. > > It is because this error/exception gets suppressed by: > linux_resume_one_lwp(): > 1578 if (!check_ptrace_stopped_lwp_gone (lp)) > 1579 throw_exception (ex); > > Which happens because check_ptrace_stopped_lwp_gone() > expects 'T (tracing stop)' while recent Linux kernels > provide 't (tracing stop)' instad. > What does lowercase t means in ps state code > http://stackoverflow.com/questions/35895886/what-does-lowercase-t-means-in-ps-state-code Eh, I'm not sure how I ended up with "T (tracing stop)" in the first place last year, as I think I was on Fedora 20, and lowercase "t (tracing stop)" is around since 2009. > > Found it on: > kernel-4.4.6-301.fc23.aarch64 > by: > gdb/nat/aarch64-linux-hw-point.c > - ctrl |= ((1 << len) - 1) << 5; > + ctrl |= (((1 << len) - 1)&~1) << 5; > > It does not change testsuite results on that F-23.aarch64 machine. > I see no real regessions on rawhide.x86_64 machine (with F-23 kernel) although > there were some fuzzy results I will need to check more. > > OK for check-in? OK. I wonder whether it wouldn't simplify things to parse the state into some new enum lwp_state instead of the current scheme of passing state strings around. I may give that a try as follow up. Thanks, Pedro Alves