aboutsummaryrefslogtreecommitdiff
path: root/gdb/solist.h
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-07-03 12:14:44 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-07-03 12:14:44 +0000
commit3a40aaa0eb849a9aacd6f1e83b94fb8b0947cdfb (patch)
tree24c19c39630f502332f0e3042a9662c3f20019ad /gdb/solist.h
parent3ccac826a3edc921e1e6c5ded9502781cca509af (diff)
downloadbinutils-3a40aaa0eb849a9aacd6f1e83b94fb8b0947cdfb.zip
binutils-3a40aaa0eb849a9aacd6f1e83b94fb8b0947cdfb.tar.gz
binutils-3a40aaa0eb849a9aacd6f1e83b94fb8b0947cdfb.tar.bz2
2007-07-03 Markus Deuling <deuling@de.ibm.com>
* 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.
Diffstat (limited to 'gdb/solist.h')
-rw-r--r--gdb/solist.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/gdb/solist.h b/gdb/solist.h
index c883686..38c292e 100644
--- a/gdb/solist.h
+++ b/gdb/solist.h
@@ -23,6 +23,8 @@
#define SOLIST_H
#define SO_NAME_MAX_PATH_SIZE 512 /* FIXME: Should be dynamic */
+/* For domain_enum domain. */
+#include "symtab.h"
/* Forward declaration for target specific link map information. This
struct is opaque to all but the target specific file. */
@@ -107,7 +109,14 @@ struct target_so_ops
Convenience function for remote debuggers finding host libs. */
int (*find_and_open_solib) (char *soname,
unsigned o_flags, char **temp_pathname);
-
+
+ /* Hook for looking up global symbols in a library-specific way. */
+ struct symbol * (*lookup_lib_global_symbol) (const struct objfile *objfile,
+ const char *name,
+ const char *linkage_name,
+ const domain_enum domain,
+ struct symtab **symtab);
+
};
/* Free the memory associated with a (so_list *). */
@@ -129,4 +138,11 @@ extern struct target_so_ops *current_target_so_ops;
#define TARGET_SO_IN_DYNSYM_RESOLVE_CODE \
(current_target_so_ops->in_dynsym_resolve_code)
+/* Handler for library-specific global symbol lookup in solib.c. */
+struct symbol *solib_global_lookup (const struct objfile *objfile,
+ const char *name,
+ const char *linkage_name,
+ const domain_enum domain,
+ struct symtab **symtab);
+
#endif