From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24419 invoked by alias); 8 Dec 2017 11:34:59 -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 24410 invoked by uid 89); 8 Dec 2017 11:34:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=BAYES_00,KAM_STOCKGEN,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy= 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 ESMTP; Fri, 08 Dec 2017 11:34:57 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B6A8687649; Fri, 8 Dec 2017 11:34:56 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 726B962660; Fri, 8 Dec 2017 11:34:53 +0000 (UTC) Subject: Re: [PATCH] Fix setting-breakpoints regression on PPC64 (function descriptors) To: Yao Qi References: <20171126163756.1515ED802F9@oc3748833570.ibm.com> <0bea6805-b8eb-da2c-07f6-0f1ee917c7b5@redhat.com> <867etxpn9k.fsf@gmail.com> Cc: Ulrich Weigand , Jan Kratochvil , Simon Marchi , Keith Seitz , gdb-patches@sourceware.org From: Pedro Alves Message-ID: <19d93119-75cb-435c-9ddb-1f42f6ac8e69@redhat.com> Date: Fri, 08 Dec 2017 11:34:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <867etxpn9k.fsf@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-12/txt/msg00174.txt.bz2 On 12/08/2017 09:44 AM, Yao Qi wrote: > Pedro Alves writes: > >> @@ -4309,22 +4309,16 @@ minsym_found (struct linespec_state *self, struct objfile *objfile, >> struct minimal_symbol *msymbol, >> std::vector *result) >> { >> - struct gdbarch *gdbarch = get_objfile_arch (objfile); >> - CORE_ADDR pc; >> struct symtab_and_line sal; >> >> - if (msymbol_is_text (msymbol)) >> - { >> - sal = find_pc_sect_line (MSYMBOL_VALUE_ADDRESS (objfile, msymbol), >> - (struct obj_section *) 0, 0); >> - sal.section = MSYMBOL_OBJ_SECTION (objfile, msymbol); > > This line is removed, so that sal.section can be null. It causes > PR 22567. How is the patch below? That's fine with me. I guess we end up with the wrong section in the function descriptor / PPC64 case (".opd" instead of some kind of ".text" where the resolved function lives), but it shouldn't matter, since the old code did that as well, AFAICT. (I noticed that get_sal_arch doesn't consider sal.objfile, probably because it predates addition of the 'obfile' field. We could probably fill in / use that field more, but we don't need to do that now.) Pedro Alves