diff options
author | Tom Tromey <tromey@adacore.com> | 2024-05-23 09:41:07 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2024-06-14 10:56:36 -0600 |
commit | fd7b969b9ecb5b983bfd6560098306ee030c4649 (patch) | |
tree | a4f920e3013af3be90d09fede9d9ae95807d2f8d /gdb/symtab.c | |
parent | 6b23978d2e6f7e36f46efece7ec13918d258fbc9 (diff) | |
download | fsf-binutils-gdb-fd7b969b9ecb5b983bfd6560098306ee030c4649.zip fsf-binutils-gdb-fd7b969b9ecb5b983bfd6560098306ee030c4649.tar.gz fsf-binutils-gdb-fd7b969b9ecb5b983bfd6560098306ee030c4649.tar.bz2 |
Move search_symbol_list to symtab.c
This moves search_symbol_list to symtab.c and exports it. It will be
useful in a later patch.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r-- | gdb/symtab.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c index 5e65b89..9aa7064 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -372,6 +372,19 @@ from_scripting_domain (int val) /* See symtab.h. */ +struct symbol * +search_symbol_list (const char *name, int num, struct symbol **syms) +{ + for (int i = 0; i < num; ++i) + { + if (strcmp (name, syms[i]->natural_name ()) == 0) + return syms[i]; + } + return nullptr; +} + +/* See symtab.h. */ + CORE_ADDR linetable_entry::pc (const struct objfile *objfile) const { |