From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [PATCH 2/6] Remove some dead code from buildsym.c
Date: Fri, 17 Apr 2026 12:24:04 -0600 [thread overview]
Message-ID: <20260417-list-in-scope-v1-2-0deb050fc03d@adacore.com> (raw)
In-Reply-To: <20260417-list-in-scope-v1-0-0deb050fc03d@adacore.com>
This patch removes some code from buildsym.c that, according to the
comment, was only used for some SCO or maybe COFF thing. This code is
dead now, and it was a hack anyway and probably should never have been
allowed.
---
gdb/buildsym.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index aa95889424b..f6cc5c153c2 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -635,18 +635,8 @@ buildsym_compunit::end_compunit_symtab_get_static_block (CORE_ADDR end_addr,
/* Make a block for the local symbols within. */
finish_block (cstk.name, cstk.old_blocks, NULL,
cstk.start_addr, end_addr);
-
- if (!m_context_stack.empty ())
- {
- /* This is said to happen with SCO. The old coffread.c
- code simply emptied the context stack, so we do the
- same. FIXME: Find out why it is happening. This is not
- believed to happen in most cases (even for coffread.c);
- it used to be an abort(). */
- complaint (_("Context stack not empty in end_compunit_symtab"));
- m_context_stack.clear ();
- }
}
+ gdb_assert (m_context_stack.empty ());
/* Executables may have out of order pending blocks; sort the
pending blocks. */
--
2.53.0
next prev parent reply other threads:[~2026-04-17 18:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-17 18:24 [PATCH 0/6] Some buildsym cleanups Tom Tromey
2026-04-17 18:24 ` [PATCH 1/6] Use scoped_restore for dwarf2_cu::list_in_scope Tom Tromey
2026-04-17 18:24 ` Tom Tromey [this message]
2026-04-17 20:10 ` [PATCH 2/6] Remove some dead code from buildsym.c Simon Marchi
2026-04-17 18:24 ` [PATCH 3/6] Remove context_stack::depth Tom Tromey
2026-04-17 18:24 ` [PATCH 4/6] Change pop_context to return a block Tom Tromey
2026-04-17 20:11 ` Simon Marchi
2026-04-17 18:24 ` [PATCH 5/6] Return void from buildsym_compunit::push_context Tom Tromey
2026-04-17 20:22 ` Simon Marchi
2026-04-17 18:24 ` [PATCH 6/6] Rename context_stack and make it private Tom Tromey
2026-04-17 20:24 ` [PATCH 0/6] Some buildsym cleanups Simon Marchi
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=20260417-list-in-scope-v1-2-0deb050fc03d@adacore.com \
--to=tromey@adacore.com \
--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