From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 117124 invoked by alias); 31 Dec 2019 04:39:46 -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 117114 invoked by uid 89); 31 Dec 2019 04:39:46 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=discover, granted, rolled, facility X-HELO: mail.bob131.so Received: from server2.bob131.so (HELO mail.bob131.so) (128.199.153.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 31 Dec 2019 04:39:45 +0000 Received: from internal.mail.bob131.so (localhost [127.0.0.1]) by mail.bob131.so (Postfix) with ESMTP id BB7373FEF1; Tue, 31 Dec 2019 04:39:42 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.bob131.so BB7373FEF1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bob131.so; s=default; t=1577767182; bh=BHHWAdRKLbufCUkvEqPsGsmyvduYoQDQvNkhRLwCaG0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aerjDopcuKA7rXQhmK3afAZCHcmKw6Dhoy6JfZJv5v0NGKqK64PRTE+C4uEaXSIAC bkndpnSM7Qzzn/3MVN14NfOXxuJfj9fsDmM7MVs+vFsOBCVssYeMdQ500jgcW95EtU M6iy6rf4pEVs4CuDeOa9CSB7UkLvH6X181thUs0jhlREHBUeBv3aGHLT+ovg81Y6gv oOIwaGw0gWXPJoUKp5qA/nVd86ho4eeeFWl1BysbrTn9K/dr4PfgDeoDS+HCHNvt65 Y12WhC+IXSGsA956QVU9hbWJMuHEMa/KOmFRGPmTxOOE7r+LxLsBj33mzXpfbG1kfh LA9+1GrOxMv9Q== Date: Tue, 31 Dec 2019 04:39:00 -0000 From: George Barrett To: Simon Marchi Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Fix handling of null stap semaphores Message-ID: <9rhhdg5t27f6viytriu_m1zufab3j6qfbalt3izvvhcvmzp2bhad@mail.bob131.so> References: <5we87igzwt5_kr.5b-38floyexzwmozuj6vb-.hmx8r4u3r41_sy@mail.bob131.so> <63-043i577lrr0nz3p9q-864io50kubhf/q6&oul1hzd/xh4.u6c@mail.bob131.so> <825af859-3594-5e29-9921-822f4193750a@simark.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <825af859-3594-5e29-9921-822f4193750a@simark.ca> X-SW-Source: 2019-12/txt/msg01080.txt.bz2 On Mon, Dec 30, 2019 at 12:59:30PM -0500, Simon Marchi wrote: > Yeah, I know writing a test case is not the most fun part, but it pays in > the long run. I can help if you are not familiar enough with > tcl/expect/dejagnu. I can stumble through enough to get something ready for review, but there is a bit of a hiccup I wanted some advice on: the testing strategy you outlined hinges on prepare_for_testing producing PIC executables, but AFAICS this is neither done by default nor can I find a facility in the test suite utilities to achieve this. Is adding -pie/-fPIC to additional_flags acceptable in this instance? On a related note, I was a bit surprised to discover that the test case doesn't actually ever define USE_PROBES since the argument provided to stap_test(_no_debuginfo) is `-DUSE_PROBES' instead of `additional_flags=-DUSE_PROBES'. This seems like a trivial enough fix to be rolled into a single commit, but I was thinking that the fix wouldn't be particularly evident from the diff if the -pie flags were added in the same patch. Would this be worth splitting into an independent patch? > Hmm, it is not only glibc-specific (I believe?), but it also requires having > glibc debug symbols installed. I just tried in an Alpine docker image > (which uses musl), and the address subtraction method works. So between the > two methods, I'd prefer the address subtraction, since it works on more > libc's, and it works without debug info for the libc. Indeed. I hadn't gotten far with testing an _r_debug approach before I realised I was taking some things for granted. > Simon Thanks