From 90dc6d24a73a2eced4b4c78541a5ab8053c56f2d Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Tue, 3 Jul 2007 12:14:44 +0000 Subject: 2007-07-03 Markus Deuling * cp-namespace.c (lookup_symbol_file): Add block to lookup_symbol_global call. * Makefile.in (solist_h): Add dependency on symtab header. (symtab.o): Add dependency on solist header. * solib.c (solib_global_lookup): New function. * solib-svr4.c (scan_dyntag): Likewise. (elf_locate_base): Call helper routine scan_dyntag. (elf_lookup_lib_symbol): New function. (_initialize_svr4_solib): Add elf_lookup_lib_symbol to svr4_so_ops. * solist.h (symtab.h): New include. (struct target_so_ops): New member lookup_lib_global_symbol. (solib_global_lookup): New prototype. * symtab.c: New include solist.h. (lookup_objfile_from_block): New function. (lookup_global_symbol_from_objfile): New function. (basic_lookup_symbol_nonlocal): Add block to lookup_symbol_global call. (lookup_symbol_global): Call library-specific lookup procedure. * symtab.h (lookup_global_symbol_from_objfile): New prototype. * NEWS: Document framework. testsuite/ * gdb.base/solib-symbol.exp: New file (testcase multiple symbol lookup). * gdb.base/solib-symbol-lib.c: Likewise. * gdb.base/solib-symbol-main.c: Likewise. --- gdb/solib.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'gdb/solib.c') diff --git a/gdb/solib.c b/gdb/solib.c index f48b0a2aae3..f522812d427 100644 --- a/gdb/solib.c +++ b/gdb/solib.c @@ -961,6 +961,24 @@ show_auto_solib_add (struct ui_file *file, int from_tty, } +/* Handler for library-specific lookup of global symbol NAME in OBJFILE. Call + the library-specific handler if it is installed for the current target. */ + +struct symbol * +solib_global_lookup (const struct objfile *objfile, + const char *name, + const char *linkage_name, + const domain_enum domain, + struct symtab **symtab) +{ + if (current_target_so_ops->lookup_lib_global_symbol != NULL) + return current_target_so_ops->lookup_lib_global_symbol (objfile, + name, linkage_name, domain, symtab); + + return NULL; +} + + extern initialize_file_ftype _initialize_solib; /* -Wmissing-prototypes */ void -- cgit v1.2.1