From: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
To: Bernd Edlinger <bernd.edlinger@hotmail.de>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
Andrew Burgess <andrew.burgess@embecosm.com>,
Joel Brobecker <brobecker@adacore.com>,
Tom Tromey <tom@tromey.com>, Pedro Alves <palves@redhat.com>,
Eli Zaretskii <eliz@gnu.org>
Subject: Re: [PATCH v5] Fix range end handling of inlined subroutines
Date: Wed, 30 Dec 2020 13:48:44 -0500 [thread overview]
Message-ID: <9dccd1ed-3a8a-e9ef-abee-056ce4642482@polymtl.ca> (raw)
In-Reply-To: <AM0PR0602MB341029C1241395C969437ED3E4D80@AM0PR0602MB3410.eurprd06.prod.outlook.com>
> From 3c345ab5f7c497151d21945cba8668e91db00e7b Mon Sep 17 00:00:00 2001
> From: Bernd Edlinger <bernd.edlinger@hotmail.de>
> Date: Tue, 3 Nov 2020 18:41:43 +0100
> Subject: [PATCH] Fix range end handling of inlined subroutines
>
> This introduces a new line table flag is_weak.
> The line entries at the end of a subroutine range,
> use this to indicate that they may possibly
> be part of the previous subroutine.
>
> When there is a sequence of line entries at the
> same address where an inline range ends, and the
> last item has is_stmt = 0, we force all previous
> items to have is_weak = 1.
>
> This is about the best we can do at the moment,
> unless location view information are added to the
> block ranges debug info structure, and location
> views are implemented in gdb in general.
Ok, I'm not sure I can reasonably review this.
First, it would make the patch easier and more inviting to review if
the commit message went a bit more in depth. If I know nothing about
the problem, it's some time-consuming patchwork to go read all the
pieces of informations in the bug reports, maybe the test cases, to
try to just understand what is the problem this patch is tackling.
When fixing anything remotely complicated, the commit message should be
of the general form:
- When we do ..., this happens
- This is wrong, we would expect ...
- This is caused by ...
- To avoid this, I propose ...
After reading the commit message, I should at least be convinced that
there is indeed a problem to be fixed and that this patch, in this form
or another, is desirable.
Anyhow, I understand somewhat the problem now (at least the one described
in bug 25987). But the patch is changing bits of twisted code here and
there without much explanation, and I can't make a mental model of what
each bit does.
Is it possible to split the patch into smaller pieces? For example, a first
patch could just the DWARF reader, and perhaps other pieces, with the goal
of having no functional changes (just augment GDB's internal line table),
with an explanation of what's added. With this kind of code, the smaller
the increment the better.
Simon
next prev parent reply other threads:[~2020-12-30 18:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-29 9:10 Bernd Edlinger
2020-12-30 17:17 ` Simon Marchi via Gdb-patches
2020-12-30 19:54 ` Bernd Edlinger
2020-12-30 22:56 ` Simon Marchi via Gdb-patches
2020-12-30 18:48 ` Simon Marchi via Gdb-patches [this message]
2020-12-30 20:49 ` Bernd Edlinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9dccd1ed-3a8a-e9ef-abee-056ce4642482@polymtl.ca \
--to=gdb-patches@sourceware.org \
--cc=andrew.burgess@embecosm.com \
--cc=bernd.edlinger@hotmail.de \
--cc=brobecker@adacore.com \
--cc=eliz@gnu.org \
--cc=palves@redhat.com \
--cc=simon.marchi@polymtl.ca \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox