From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 49285 invoked by alias); 20 Oct 2017 19:02:31 -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 49275 invoked by uid 89); 20 Oct 2017 19:02:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=grateful, Hx-languages-length:1766, offer 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, 20 Oct 2017 19:02:29 +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 4FBFBA0B5C for ; Fri, 20 Oct 2017 19:02:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4FBFBA0B5C Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=keiths@redhat.com Received: from valrhona.uglyboxes.com (ovpn04.gateway.prod.ext.phx2.redhat.com [10.5.9.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2B9F85D75E for ; Fri, 20 Oct 2017 19:02:27 +0000 (UTC) Subject: Re: [PATCH 2/2] Report stop locations in inlined functions. To: gdb-patches@sourceware.org References: <1499740601-15957-1-git-send-email-keiths@redhat.com> <1499740601-15957-2-git-send-email-keiths@redhat.com> <4bfba041-22f5-1650-1f83-0f8860f202fb@redhat.com> From: Keith Seitz Message-ID: Date: Fri, 20 Oct 2017 19:02:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <4bfba041-22f5-1650-1f83-0f8860f202fb@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-10/txt/msg00680.txt.bz2 On 07/18/2017 10:16 AM, Pedro Alves wrote: >> >> I don't quite like this, though. This solution involves calling >> decode_line_full, and that is really expensive, so I would be grateful if >> maintaienrs could offer advice on how to better tackle this. > > I'm still trying to grok these patches fully, but, shouldn't comparing > the breakpoint's bp_location's addresses work the same? I.e., with this, > gdb.opt/inline-break.exp still passes cleanly here: I've played with your suggestion, and I *think* I am getting close. :-) > diff --git a/gdb/inline-frame.c b/gdb/inline-frame.c > index 006ae0d..9120554 100644 > --- a/gdb/inline-frame.c > +++ b/gdb/inline-frame.c > @@ -349,23 +330,19 @@ skip_inline_frames (ptid_t ptid, struct breakpoint *bpt) > if (BLOCK_START (cur_block) == this_pc > || block_starting_point_at (this_pc, cur_block)) > { > - int lsal_i; > - struct linespec_sals *lsal; > bool skip_this_frame = true; > > - for (lsal_i = 0; > - VEC_iterate (linespec_sals, canonical.sals, > - lsal_i, lsal); lsal_i++) > + if (bpt != NULL > + && breakpoint_address_is_meaningful (bpt)) > { > - struct symtabs_and_lines &sals = lsal->sals; > - > - for (int sals_i = 0; sals_i < sals.nelts; sals_i++) > - { > - struct symtab_and_line &sal = sals.sals[sals_i]; > - > - if (sal.pc == this_pc) > + for (bp_location *loc = bpt->loc; > + loc != NULL; > + loc = loc->next) > + if (this_pc == loc->address) > + { > skip_this_frame = false; > - } > + break; > + } > } > > if (skip_this_frame) > The next version of this patch does this, and it works. One small addition I had to make was to /not/ skip inline frames for non-user breakpoints. step-resume breakpoints, IIRC, were otherwise broken. Keith