Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH v2 1/5] [gdb/symtab] Rename lnp_state_machine::m_last_line to m_last_recorded_line
Date: Mon, 20 Apr 2026 15:46:04 +0200	[thread overview]
Message-ID: <20260420134608.2537059-2-tdevries@suse.de> (raw)
In-Reply-To: <20260420134608.2537059-1-tdevries@suse.de>

In class lnp_state_machine, we have member m_last_line:
...
  /* The last line number that was recorded, used to coalesce
     consecutive entries for the same line.  This can happen, for
     example, when discriminators are present.  PR 17276.  */
  unsigned int m_last_line = 0;
...
representing the last recorded line.

Let's make this situation more clear, and rename it to m_last_recorded_line.
---
 gdb/dwarf2/line-program.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gdb/dwarf2/line-program.c b/gdb/dwarf2/line-program.c
index b9da1b4799f..6020fe1fa55 100644
--- a/gdb/dwarf2/line-program.c
+++ b/gdb/dwarf2/line-program.c
@@ -196,7 +196,7 @@ class lnp_state_machine
   /* The last line number that was recorded, used to coalesce
      consecutive entries for the same line.  This can happen, for
      example, when discriminators are present.  PR 17276.  */
-  unsigned int m_last_line = 0;
+  unsigned int m_last_recorded_line = 0;
   bool m_line_has_non_zero_discriminator = false;
 };
 
@@ -301,7 +301,7 @@ lnp_state_machine::record_line_p ()
 {
   if (m_builder->get_current_subfile () != m_last_subfile)
     return true;
-  if (m_line != m_last_line)
+  if (m_line != m_last_recorded_line)
     return true;
   /* Same line for the same file that we've seen already.
      As a last check, for pr 17276, only record the line if the line
@@ -495,7 +495,7 @@ lnp_state_machine::record_line (bool end_sequence)
 	    {
 	      m_last_subfile = m_builder->get_current_subfile ();
 	      record_line_1 (m_line, lte_flags);
-	      m_last_line = m_line;
+	      m_last_recorded_line = m_line;
 	    }
 	}
     }
-- 
2.51.0


  reply	other threads:[~2026-04-20 13:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-20 13:46 [PATCH v2 0/5] [gdb/symtab] Tweak fix-up of truncated inline function block ranges Tom de Vries
2026-04-20 13:46 ` Tom de Vries [this message]
2026-04-20 13:46 ` [PATCH v2 2/5] [gdb/symtab] Re-add lnp_state_machine::m_last_line Tom de Vries
2026-04-20 13:46 ` [PATCH v2 3/5] [gdb/symtab] Simplify assignment in lnp_state_machine::record_line Tom de Vries
2026-04-20 13:46 ` [PATCH v2 4/5] [gdb/symtab] Add lnp_state_machine::m_stmt_at_last_address Tom de Vries
2026-04-20 13:46 ` [PATCH v2 5/5] [gdb/symtab] Tweak fix-up of truncated inline function block ranges Tom de Vries
2026-07-29 11:01 ` [PING][PATCH v2 0/5] " Tom de Vries

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=20260420134608.2537059-2-tdevries@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    /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