From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 117938 invoked by alias); 28 Jun 2018 14:48:44 -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 108889 invoked by uid 89); 28 Jun 2018 14:48:31 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS,TIME_LIMIT_EXCEEDED autolearn=unavailable version=3.3.2 spammy=Hx-languages-length:2277 X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 28 Jun 2018 14:48:16 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2B781738E0; Thu, 28 Jun 2018 14:48:13 +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 563DD2156880; Thu, 28 Jun 2018 14:48:12 +0000 (UTC) Subject: Re: [pushed] Change inline frame breakpoint skipping logic (fix gdb.gdb/selftest.exp) To: Joel Brobecker References: <20180612150620.wloegrt5dgpdugi2@localhost.localdomain> <58a758b7-e4b4-4fee-c7cb-be5a2ab344e6@suse.de> <8c7ace90-f0b8-56f0-0033-5b7827796037@redhat.com> <20180625210436.GA11382@adacore.com> <28957003-ed3e-68d3-6002-71e5e5996204@redhat.com> <20180626220238.GD8075@adacore.com> <8b697d21-aa2b-15a4-e796-71c37d4c7942@redhat.com> Cc: Tom de Vries , gdb-patches@sourceware.org, Keith Seitz From: Pedro Alves Message-ID: <77528608-be2c-5a21-e250-36e7d56ba950@redhat.com> Date: Thu, 28 Jun 2018 14:48:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <8b697d21-aa2b-15a4-e796-71c37d4c7942@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-06/txt/msg00683.txt.bz2 On 06/27/2018 05:28 PM, Pedro Alves wrote: > Hi Joel, > > On 06/26/2018 11:02 PM, Joel Brobecker wrote: > >> Just a quick message that the patch makes sense to me, and that >> I was just able to run it through AdaCore's testsuite with succes. >> Or, I should qualify that - there is one tiny change that I haven't >> had time to analyze, but from the surface, it is exactly what you >> explained about why you need the second hunk. >> >> I haven't had a chance to run it through the official testsuite, >> however, as I have to go ... I am so laaaaate! >> >> I can do that tomorrow, or if you prefer to just finish the patch >> up and push it, it'd be perfect. I think the patch is good. >> >> Thanks again! > > FYI, I'm starting to look at this now. So while poking some more at this, noticed that setting a breakpoint by address crashes in the same way, like "b *ADDRESS". So I thought that maybe it would be better to make stopped_by_user_bp_inline_frame return true if the location has no symbol instead of returning false like in the version I sent before. That preserves the previous behavior of showing the stop at the inline function if we miss setting the sal's symbol somewhere. However, playing with that made me notice something else unrelated to my "Change inline frame breakpoint skipping" patch: (gdb) b *0x40062f Breakpoint 2 at 0x40062f: file inline-break.c, line 32. (gdb) info breakpoints Num Type Disp Enb Address What 2 breakpoint keep y 0x000000000040062f in main at inline-break.c:32 (gdb) r .... Breakpoint 2, func1 (x=1) at inline-break.c:32 32 return x * 23; /* break here */ Notice that above "info break" says "in main": in main at inline-break.c:32 ^^^^ Since we say "inline-break.c:32" everywhere, and present the stop at the inline function, I think that "info break" should say instead: in func1 at inline-break.c:32 ^^^^^ Fixing that ends up going back to setting the symbol in the sal again, but I decided to do that in a separate patch, and still make "loc->symbol == nullptr" in stopped_by_user_bp_inline_frame return true, unlike the previous version of the patch. I'll be sending two patches in response to this email. Thanks, Pedro Alves