]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/buildsym: remove find_symbol_in_list
authorSimon Marchi <simon.marchi@efficios.com>
Fri, 19 Dec 2025 18:43:39 +0000 (13:43 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Mon, 5 Jan 2026 20:26:30 +0000 (15:26 -0500)
It is unused.

Change-Id: Iecc488afeaa123d6ad6e7a2952bb46539ef020a2
Approved-By: Tom Tromey <tom@tromey.com>
gdb/buildsym.c
gdb/buildsym.h

index 31fd59b5a1e001fc054fb095ff2c1ca19ad574c5..f8daaccac296f5eab96e2d9a0d37050dd4cf0c24 100644 (file)
@@ -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.  */
index 1fa582b1ea813b9215fe29ec7a76d27021411a9d..e1240810f1f9e32279e72a2ecf30ad69aaa2c59b 100644 (file)
@@ -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 */