From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27375 invoked by alias); 29 Nov 2017 19:20:06 -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 27365 invoked by uid 89); 29 Nov 2017 19:20:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 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=amb 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; Wed, 29 Nov 2017 19:20:04 +0000 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vATJK2f9118080 for ; Wed, 29 Nov 2017 14:20:03 -0500 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 2ej188vm0t-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 29 Nov 2017 14:20:02 -0500 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 29 Nov 2017 19:19:52 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 29 Nov 2017 19:19:49 -0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vATJJnL747972372; Wed, 29 Nov 2017 19:19:49 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B0B77AE057; Wed, 29 Nov 2017 19:12:55 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9C7FAAE053; Wed, 29 Nov 2017 19:12:55 +0000 (GMT) Received: from oc3748833570.ibm.com (unknown [9.164.153.34]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 29 Nov 2017 19:12:55 +0000 (GMT) Received: by oc3748833570.ibm.com (Postfix, from userid 1000) id A7DF7D80320; Wed, 29 Nov 2017 20:19:48 +0100 (CET) Subject: Re: [PATCH] Fix setting-breakpoints regression on PPC64 (function descriptors) (was: Re: ppc64 regression: [PATCH 1/2] Fix "list amb To: palves@redhat.com (Pedro Alves) Date: Wed, 29 Nov 2017 19:20:00 -0000 From: "Ulrich Weigand" Cc: jan.kratochvil@redhat.com (Jan Kratochvil), simon.marchi@ericsson.com (Simon Marchi), keiths@redhat.com (Keith Seitz), gdb-patches@sourceware.org In-Reply-To: <0bea6805-b8eb-da2c-07f6-0f1ee917c7b5@redhat.com> from "Pedro Alves" at Nov 29, 2017 07:07:54 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17112919-0040-0000-0000-000004141B6F X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17112919-0041-0000-0000-000020B700A7 Message-Id: <20171129191948.A7DF7D80320@oc3748833570.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-29_07:,, 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-1711290250 X-SW-Source: 2017-11/txt/msg00790.txt.bz2 Pedro Alves wrote: > On 11/26/2017 04:37 PM, Ulrich Weigand wrote: > > > 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. > > Thanks for the suggestion. Here's a patch that implements > something like that. WDYT? Yes, this looks all good to me. Thanks for taking care of this! Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com