From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by sourceware.org (Postfix) with ESMTPS id 97DCB387700A for ; Tue, 17 Mar 2020 18:56:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 97DCB387700A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andrew.burgess@embecosm.com Received: by mail-wm1-x32e.google.com with SMTP id z13so484036wml.0 for ; Tue, 17 Mar 2020 11:56:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ADDgkAt1BkJ1yu9RP5xAtY3UCjXdX6sZ419f9gVtqKs=; b=gPS7gW57/jgulpkwW3ExK+5/5BZ0ayDbNuELeeNevBqIl+8a+4BVI4tZrmUu1la5yk EW8Jj7Uer9RAfi5oIajrPeDNU5wTBsVD/Ia+mdGaPxqgLXn5shFPm8MpSGb1ystP70zL njuLmSeQiHpy43Zf/hxSAqc9lTdh3V76MONUH9WWoE6BnVxj00DatpYUsfmWJoAYeG2w EDO30RuOhHWLYhXTAbr0RQyT7/Z3EyZvFX+5r22wMvB/XrVUoMoQIkmRu69w0ixnXOAm lwP2mBspQdikmOoUJo1nYTov8PcQ6FSCwAIw72Og/KTfMXRGMFPx7zLu89vXjUcDgY1Z Fkaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ADDgkAt1BkJ1yu9RP5xAtY3UCjXdX6sZ419f9gVtqKs=; b=nPTmMV949YjDSIE8rsM+Snh6S/FqfJL5DYYIaP+7AQXfhDCM7rKLEnB/zgu6BAiDDP mT+7Qm7TzJbk6BcM7OTyLcqZQmcfX62TG7qfX9ZaZyhf0Z0/genQAFS2Z9iiKW7S9Ehe xEBlaFVcffMmRB9kd4W/cynSw0vaE+eiGK72aT3QNsf6IsJmsocGxpcNf0ELacylualz s0qlmlXxxJw5hnwB7gyBmCiiTUwwQNIJ4n0ppVGPp7UvdNYjSTC0cVR9LzIucgrh5RhS dZEC+nZj72Uk8zRZfm/IYFefOjWFM2yS7urCk0VtzYSthOKiFMRD4+0p0srsMytNELMC xtkg== X-Gm-Message-State: ANhLgQ0tBXUpWju8NO0ctv0WOfe9PzKW6jlZo8tZDOAr0vijAI6zegIL P+Nl/lzZt/yPO8/MLxRNOczIsg== X-Google-Smtp-Source: ADFU+vuzGJ2MeRpbLs64VyfEF8PVTN8tMrbt2zXzvSHzAhvMPBhFGa1wH5a+UrZiQQkqXYUWYqXBaA== X-Received: by 2002:a7b:c202:: with SMTP id x2mr424184wmi.71.1584471402579; Tue, 17 Mar 2020 11:56:42 -0700 (PDT) Received: from localhost (host86-180-62-221.range86-180.btcentralplus.com. [86.180.62.221]) by smtp.gmail.com with ESMTPSA id q8sm426288wmg.6.2020.03.17.11.56.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Mar 2020 11:56:41 -0700 (PDT) Date: Tue, 17 Mar 2020 18:56:40 +0000 From: Andrew Burgess To: Tom Tromey Cc: gdb-patches@sourceware.org, Bernd Edlinger Subject: Re: [PATCHv2 2/2] gdb: Add support for tracking the DWARF line table is-stmt field Message-ID: <20200317185640.GL3317@embecosm.com> References: <87d09c3tmu.fsf@tromey.com> <875zf34086.fsf@tromey.com> <875zf2zvpm.fsf@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <875zf2zvpm.fsf@tromey.com> X-Operating-System: Linux/4.18.19-100.fc27.x86_64 (x86_64) X-Uptime: 18:49:18 up 32 days, 6:18, X-Fortune: There is no time like the present for postponing what you ought to be doing. X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] User-Agent: Mutt/1.9.2 (2017-12-15) X-Spam-Status: No, score=-25.2 required=5.0 tests=DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Mar 2020 18:56:44 -0000 * Tom Tromey [2020-03-17 12:23:49 -0600]: > Tom> Actually, when I back out the hunk, I get: > Tom> Breakpoint 1 at 0x80000042: file r.h, line 6. > Tom> However, in the past it appears this mentioned the function name. > > I think I'm mistaken about this, so IMO we can just drop this part and > focus on whether we should remove that buildsym.c hunk. The hunk in question is only an optimisation because we now see lots of duplicate entries toggling between is-stmt true and is-stmt false. I don't believe that keeping the duplicates around would cause any problems. I would be quite happy if you wanted to remove the hunk. We might also consider something like this totally untested patch: ## START ## diff --git a/gdb/buildsym.c b/gdb/buildsym.c index 7155db34b08..b0d0bc53eb5 100644 --- a/gdb/buildsym.c +++ b/gdb/buildsym.c @@ -683,16 +683,12 @@ buildsym_compunit::record_line (struct subfile *subfile, int line, if (subfile->line_vector->nitems > 0) { - /* If we have a duplicate for the previous entry then ignore the new - entry, except, if the new entry is setting the is_stmt flag, then - ensure the previous entry respects the new setting. */ + /* If the previous entry is for the same line, at the same pc, and + is marked as a statement, while we are trying to add a + non-statement, then lets just drop this new non-statement. */ e = subfile->line_vector->item + subfile->line_vector->nitems - 1; - if (e->line == line && e->pc == pc) - { - if (is_stmt && !e->is_stmt) - e->is_stmt = 1; - return; - } + if (e->line == line && e->pc == pc && e->is_stmt && !is_stmt) + return } if (subfile->line_vector->nitems + 1 >= subfile->line_vector_length) ## END ## This will remove fewer duplicates, but should keep around the ones we care about I hope. I'll test that patch at this end, but do let me know if it solves the regression you're seeing. Thanks, Andrew