[1/6] gdb/buildsym: remove find_symbol_in_list

Message ID 20251219184426.406228-1-simon.marchi@efficios.com
State New
Headers
Series [1/6] gdb/buildsym: remove find_symbol_in_list |

Commit Message

Simon Marchi Dec. 19, 2025, 6:43 p.m. UTC
  It is unused.

Change-Id: Iecc488afeaa123d6ad6e7a2952bb46539ef020a2
---
 gdb/buildsym.c | 25 -------------------------
 gdb/buildsym.h |  3 ---
 2 files changed, 28 deletions(-)


base-commit: 4e05bdc73a0f0a598af22829b6ee980afb4d22e2
  

Comments

Tom Tromey Jan. 5, 2026, 4:51 p.m. UTC | #1
>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:

Simon> It is unused.

Thanks.  I guess more fallout from the stabs removal, a thread we'll be
unraveling for years.

Approved-By: Tom Tromey <tom@tromey.com>

Tom
  

Patch

diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index 750f049d7204..e6bb86a6404c 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -135,31 +135,6 @@  add_symbol_to_list (struct symbol *symbol, struct pending **listhead)
   (*listhead)->symbol[(*listhead)->nsyms++] = symbol;
 }
 
-/* Find a symbol named NAME on a LIST.  NAME need not be
-   '\0'-terminated; LENGTH is the length of the name.  */
-
-struct symbol *
-find_symbol_in_list (struct pending *list, char *name, int length)
-{
-  int j;
-  const char *pp;
-
-  while (list != NULL)
-    {
-      for (j = list->nsyms; --j >= 0;)
-	{
-	  pp = list->symbol[j]->linkage_name ();
-	  if (*pp == *name && strncmp (pp, name, length) == 0
-	      && pp[length] == '\0')
-	    {
-	      return (list->symbol[j]);
-	    }
-	}
-      list = list->next;
-    }
-  return (NULL);
-}
-
 /* Record BLOCK on the list of all blocks in the file.  Put it after
    OPBLOCK, or at the beginning if opblock is NULL.  This puts the
    block in the list after all its subblocks.  */
diff --git a/gdb/buildsym.h b/gdb/buildsym.h
index f7fb2c2c4529..0faf308f7a05 100644
--- a/gdb/buildsym.h
+++ b/gdb/buildsym.h
@@ -449,7 +449,4 @@  using buildsym_compunit_up = std::unique_ptr<buildsym_compunit>;
 extern void add_symbol_to_list (struct symbol *symbol,
 				struct pending **listhead);
 
-extern struct symbol *find_symbol_in_list (struct pending *list,
-					   char *name, int length);
-
 #endif /* GDB_BUILDSYM_H */