From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16339 invoked by alias); 17 Oct 2017 15:48:20 -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 16167 invoked by uid 89); 17 Oct 2017 15:48:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1693 X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 17 Oct 2017 15:48:04 +0000 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v9HFkMQ8094501 for ; Tue, 17 Oct 2017 11:48:03 -0400 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0a-001b2d01.pphosted.com with ESMTP id 2dnk4w63ts-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 17 Oct 2017 11:48:03 -0400 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 17 Oct 2017 16:48:01 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 17 Oct 2017 16:47:59 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v9HFlx5q26476720; Tue, 17 Oct 2017 15:47:59 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1CBEAAE045; Tue, 17 Oct 2017 16:42:08 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0916CAE053; Tue, 17 Oct 2017 16:42:08 +0100 (BST) Received: from oc3748833570.ibm.com (unknown [9.167.243.191]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 17 Oct 2017 16:42:07 +0100 (BST) Received: by oc3748833570.ibm.com (Postfix, from userid 1000) id DD85FD807C2; Tue, 17 Oct 2017 17:47:58 +0200 (CEST) Subject: Re: Sporadic failures of selftest tests To: palves@redhat.com (Pedro Alves) Date: Tue, 17 Oct 2017 15:48:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: from "Pedro Alves" at Oct 17, 2017 03:55:24 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17101715-0012-0000-0000-00000582B6EB X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17101715-0013-0000-0000-000018FD0989 Message-Id: <20171017154758.DD85FD807C2@oc3748833570.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-10-17_11:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1710170222 X-SW-Source: 2017-10/txt/msg00530.txt.bz2 Pedro Alves wrote: > On 10/17/2017 03:40 PM, Pedro Alves wrote: > > On 10/17/2017 03:34 PM, Pedro Alves wrote: > > > >> Wait, is your build of GDB an optimized build? Maybe the compiler > >> managed to inline captured_command_loop for you? Currnetly, when > >> GDB stops for an inline breakpoint, it stops at the stack caller, > >> which would explain this. > > > > Yup, I can reproduce this with: > > > > $ rm -f main.o && make CXXFLAGS="-g3 -O2" > > $ make check TESTS="*/complaints.exp" > > [...] > > Running src/gdb/testsuite/gdb.gdb/complaints.exp ... > > FAIL: gdb.gdb/complaints.exp: run until breakpoint at captured_command_loop > > WARNING: Couldn't test self > > Ah, and in addition to the wrong function hit, I do also see > the prompt issue then. Yes, this looks like what I'm seeing. Note that the wrong function hit is just an XFAIL, so I didn't notice it (but this is actually what I get in the "good" case too). > So indeed, that inferior gdb prompt can confuse gdb_test_multiple. > That prompt is only output in optimized builds, because in that > case, due to inlining, the breakpoint happens to trigger _after_ > captured_command_loop prints the prompt... In non-optimized builds, > the prompt is _not_ output. But what confuses me is that in a normal build, GDB by default gets built with -O2 for me, so I'm wondering why you had to use special CXXFLAGS above. Also, I'm wondering why I'm only seeing this now, when this has apparently been broken all the time. Just some random timing issues that are now different for some reason? Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com