]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove get_context_stack_depth
authorTom Tromey <tom@tromey.com>
Fri, 24 Oct 2025 00:04:14 +0000 (18:04 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 24 Oct 2025 00:17:11 +0000 (18:17 -0600)
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
gdb/buildsym-legacy.h
gdb/buildsym.h

index af7bb5377ba03e5130365be1ad51a80e03a1deb8..5e9e0422d1b70e2b1dbf72e2e3a9e745d0f5c54a 100644 (file)
@@ -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 ()
 {
index 06d39e8529f12476dd365badc8dc36a1127e3251..006be225d24153eb988c2d02df9a67b33904a3cf 100644 (file)
@@ -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 ();
index a3127f9d1471a47be0297b061eeb403ca631dd61..2a64ad5640b4ace757f515d88c671f12b4680076 100644 (file)
@@ -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;