From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH 2/3] [gdb/symtab] Re-add lnp_state_machine::m_last_line
Date: Mon, 2 Mar 2026 12:48:48 +0100 [thread overview]
Message-ID: <20260302114849.1797017-3-tdevries@suse.de> (raw)
In-Reply-To: <20260302114849.1797017-1-tdevries@suse.de>
In class lnp_state_machine, we have member:
...
/* The address of the last line entry. */
unrelocated_addr m_last_address;
...
representing the address of the last line entry.
Add a similar member for the line of the last line entry.
---
gdb/dwarf2/line-program.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gdb/dwarf2/line-program.c b/gdb/dwarf2/line-program.c
index a28d589e251..b9d93bb7b0e 100644
--- a/gdb/dwarf2/line-program.c
+++ b/gdb/dwarf2/line-program.c
@@ -181,8 +181,9 @@ class lnp_state_machine
/* The last file a line number was recorded for. */
struct subfile *m_last_subfile = NULL;
- /* The address of the last line entry. */
+ /* The address and line of the last line entry. */
unrelocated_addr m_last_address;
+ unsigned int m_last_line = 0;
/* Set to true when a previous line at the same address (using
m_last_address) had LEF_IS_STMT set in m_flags. This is reset to false
@@ -508,6 +509,8 @@ lnp_state_machine::record_line (bool end_sequence)
m_last_address = m_address;
}
m_stmt_at_address |= (m_flags & LEF_IS_STMT) != 0;
+
+ m_last_line = m_line;
}
lnp_state_machine::lnp_state_machine (struct dwarf2_cu *cu, gdbarch *arch)
--
2.51.0
next prev parent reply other threads:[~2026-03-02 11:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-02 11:48 [PATCH 0/3] [gdb/symtab] Tweak fix-up of truncated inline function block ranges Tom de Vries
2026-03-02 11:48 ` [PATCH 1/3] [gdb/symtab] Rename lnp_state_machine::m_last_line to m_last_recorded_line Tom de Vries
2026-03-02 11:48 ` Tom de Vries [this message]
2026-03-02 11:48 ` [PATCH 3/3] [gdb/symtab] Tweak fix-up of truncated inline function block ranges Tom de Vries
2026-03-10 16:05 ` Andrew Burgess
2026-03-10 20:34 ` Tom de Vries
2026-03-14 14:22 ` Andrew Burgess
2026-03-14 14:53 ` Tom de Vries
2026-03-11 13:24 ` Tom de Vries
2026-03-11 15:13 ` Tom de Vries
2026-03-12 6:45 ` Tom de Vries
2026-03-12 12:07 ` Tom de Vries
2026-03-19 15:39 ` Andrew Burgess
2026-04-20 14:38 ` 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=20260302114849.1797017-3-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