From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 47612 invoked by alias); 26 Nov 2017 16:38:05 -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 47603 invoked by uid 89); 26 Nov 2017 16:38:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.8 required=5.0 tests=AWL,BAYES_00,KB_WAM_FROM_NAME_SINGLEWORD,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=UD:E, BE 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; Sun, 26 Nov 2017 16:38:03 +0000 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vAQGYi36106056 for ; Sun, 26 Nov 2017 11:38:02 -0500 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0a-001b2d01.pphosted.com with ESMTP id 2efpxb0hce-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Sun, 26 Nov 2017 11:38:01 -0500 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 26 Nov 2017 16:37:59 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Sun, 26 Nov 2017 16:37:57 -0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vAQGbuqR26738700; Sun, 26 Nov 2017 16:37:56 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6592342049; Sun, 26 Nov 2017 16:32:35 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 50D3A42045; Sun, 26 Nov 2017 16:32:35 +0000 (GMT) Received: from oc3748833570.ibm.com (unknown [9.164.156.220]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Sun, 26 Nov 2017 16:32:35 +0000 (GMT) Received: by oc3748833570.ibm.com (Postfix, from userid 1000) id 1515ED802F9; Sun, 26 Nov 2017 17:37:56 +0100 (CET) Subject: Re: ppc64 regression: [PATCH 1/2] Fix "list ambiguous_variable" To: jan.kratochvil@redhat.com (Jan Kratochvil) Date: Sun, 26 Nov 2017 16:38:00 -0000 From: "Ulrich Weigand" Cc: palves@redhat.com (Pedro Alves), simon.marchi@ericsson.com (Simon Marchi), keiths@redhat.com (Keith Seitz), gdb-patches@sourceware.org In-Reply-To: <20171125074041.GA17197@host1.jankratochvil.net> from "Jan Kratochvil" at Nov 25, 2017 08:40:41 AM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17112616-0020-0000-0000-000003D0AD31 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17112616-0021-0000-0000-000042660C73 Message-Id: <20171126163756.1515ED802F9@oc3748833570.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-26_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1711260232 X-SW-Source: 2017-11/txt/msg00666.txt.bz2 Jan Kratochvil wrote: > On Mon, 16 Oct 2017 17:03:18 +0200, Simon Marchi wrote: > > The buildbot shows some failures on ppc64be: > > > > PASS -> FAIL: gdb.base/dbx.exp: whereis my_list > > PASS -> FAIL: gdb.mi/gdb669.exp: -thread-list-ids > > PASS -> FAIL: gdb.mi/gdb669.exp: finding MI result string > > PASS -> FAIL: gdb.mi/gdb669.exp: finding number of threads in MI output > > > > I tested on gcc110, and bisect points to this patch here (for both tests). > > A symptom of the problem is that "break main" generates two locations. > > > > Before (at e5f25bc5^): > > > > (gdb) b main > > Breakpoint 1 at 0x10000560: file test.c, line 3. > > (gdb) info breakpoints > > Num Type Disp Enb Address What > > 1 breakpoint keep y 0x0000000010000560 in main at test.c:3 > > > > After (at e5f25bc5) > > > > (gdb) b main > > Breakpoint 1 at 0x10000560: main. (2 locations) > > (gdb) info breakpoints > > Num Type Disp Enb Address What > > 1 breakpoint keep y > > 1.1 y 0x0000000010000560 in main at test.c:3 > > 1.2 y 0x0000000010020078
> > I have also hit this regression now on RHEL-7.5pre ppc64: > > e5f25bc5d6dba5a5c4dd36e08afd57e918c63dea is the first bad commit > commit e5f25bc5d6dba5a5c4dd36e08afd57e918c63dea > Author: Pedro Alves > Date: Wed Sep 20 16:12:54 2017 +0100 > Fix "list ambiguous_variable" > > echo 'main(){}'|gcc -g -x c -;./gdb -batch ./a.out -ex start > Temporary breakpoint 1 at 0x10000560: file , line 1. > Temporary breakpoint 1, main () at :1 > 1 : No such file or directory. > -> > Temporary breakpoint 1 at 0x10000560: main. (2 locations) > Program received signal SIGSEGV, Segmentation fault. > 0x7d82100810000554 in ?? () I now see this as well on Cell/B.E. This is a serious regression that causes "start" to always fail for me ... The problem seems to be that GDB sets a breakpoint into the function descriptor for main, which is not a good idea. Looking at the commit identified above, it seems that GDB now only runs the address through gdbarch_convert_from_func_ptr_addr if msymbol_is_text returns true. However, if the symbol points to a function descriptor, msymbol_is_text would be false since this is in fact outside the text section. So I think probably we need to still run the address through gdbarch_convert_from_func_ptr_addr, and if that detects that it was indeed a function descriptor, always treat the resulting address as a function. Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com