From f1a4759630b4e8b6416381e18c73c3ed6d96e374 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 23 Oct 2025 18:04:14 -0600 Subject: [PATCH] Remove get_context_stack_depth Nothing calls get_context_stack_depth, so this patch removes it. I looked at also removing context_stack::depth but apparently this is used in coffread.c, and I didn't want to figure out how to make it local to just that code. I'm checking this in as obvious. --- gdb/buildsym-legacy.c | 9 --------- gdb/buildsym-legacy.h | 4 ---- gdb/buildsym.h | 5 ----- 3 files changed, 18 deletions(-) diff --git a/gdb/buildsym-legacy.c b/gdb/buildsym-legacy.c index af7bb5377ba..5e9e0422d1b 100644 --- a/gdb/buildsym-legacy.c +++ b/gdb/buildsym-legacy.c @@ -87,15 +87,6 @@ outermost_context_p () /* See buildsym.h. */ -int -get_context_stack_depth () -{ - gdb_assert (buildsym_compunit != nullptr); - return buildsym_compunit->get_context_stack_depth (); -} - -/* See buildsym.h. */ - struct subfile * get_current_subfile () { diff --git a/gdb/buildsym-legacy.h b/gdb/buildsym-legacy.h index 06d39e8529f..006be225d24 100644 --- a/gdb/buildsym-legacy.h +++ b/gdb/buildsym-legacy.h @@ -130,10 +130,6 @@ extern CORE_ADDR get_last_source_start_addr (); extern bool outermost_context_p (); -/* Return the context stack depth. */ - -extern int get_context_stack_depth (); - /* Return the current subfile. */ extern struct subfile *get_current_subfile (); diff --git a/gdb/buildsym.h b/gdb/buildsym.h index a3127f9d147..2a64ad5640b 100644 --- a/gdb/buildsym.h +++ b/gdb/buildsym.h @@ -287,11 +287,6 @@ struct buildsym_compunit return &m_context_stack.back (); } - int get_context_stack_depth () const - { - return m_context_stack.size (); - } - struct subfile *get_current_subfile () { return m_current_subfile; -- 2.47.3