diff options
author | Jeff Law <law@redhat.com> | 1996-01-23 21:06:34 +0000 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 1996-01-23 21:06:34 +0000 |
commit | 87273c713f0e22999692252d3dcdbb5613ab5729 (patch) | |
tree | 72dfac044f46de43245498f663f6d03a918ad3b9 /gdb/minsyms.c | |
parent | b96e1ce4f80e86b0f31901b5af49d571d3c65ed1 (diff) | |
download | gdb-87273c713f0e22999692252d3dcdbb5613ab5729.zip gdb-87273c713f0e22999692252d3dcdbb5613ab5729.tar.gz gdb-87273c713f0e22999692252d3dcdbb5613ab5729.tar.bz2 |
* symfile.c (auto_solib_add): Renamed from auto_solib_add_at_startup.
All references changed.
* breakpoint.c (bpstat_what): Add shlib_event to the class types.
Update state table. Reformat so that it's still readable.
When we hit the shlib_event breakpoint, set the calss of shlib_event.
(breakpoint_1): Add "shlib events" as a breakpoint type.
Print the shlib_event breakpoint like other breakpoints.
(create_solib_event_breakpoint): New function.
(breakpoint_re_set_one): Handle solib_event breakpoints.
* breakpoint.h (enum bytype): Add bp_shlib_event breakpoint type.
(enum bpstat_what_main_action): Add BPSTAT_WHAT_CHECK_SHLIBS
action.
(create_solib_event_breakpoint): Declare.
* infrun.c (wait_for_inferior): Handle CHECK_SHLIBS bpstat.
(normal_stop): Inform the user when the inferior stoped due
to a shared library event.
(_initialize_infrun): Add new set/show variable "stop_on-solib-events"
to control whether or not gdb continues the inferior or stops it when
a shared library event occurs.
* minsyms.c (lookup_minimal_symbol_solib_trampoline): New function.
* somsolib.c (TODO list): Update.
(som_solib_create_inferior_hook): Arrange for gdb to be notified
when significant shared library events occur.
* hppa-tdep.c (find_unwind_entry): No longer static.
First cut at the machine independent changes for 7363. Also includes
code to automatically track shl_load/shl_unload calls on hpux.
Diffstat (limited to 'gdb/minsyms.c')
-rw-r--r-- | gdb/minsyms.c | 52 |
1 files changed, 51 insertions, 1 deletions
diff --git a/gdb/minsyms.c b/gdb/minsyms.c index e36302e..6ef709a 100644 --- a/gdb/minsyms.c +++ b/gdb/minsyms.c @@ -1,5 +1,5 @@ /* GDB routines for manipulating the minimal symbol tables. - Copyright 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc. + Copyright 1992, 1993, 1994, 1996, 1996 Free Software Foundation, Inc. Contributed by Cygnus Support, using pieces from other GDB modules. This file is part of GDB. @@ -253,6 +253,56 @@ lookup_minimal_symbol_text (name, sfile, objf) return NULL; } +/* Look through all the current minimal symbol tables and find the + first minimal symbol that matches NAME and of solib trampoline type. + If OBJF is non-NULL, limit + the search to that objfile. If SFILE is non-NULL, limit the search + to that source file. Returns a pointer to the minimal symbol that + matches, or NULL if no match is found. +*/ + +struct minimal_symbol * +lookup_minimal_symbol_solib_trampoline (name, sfile, objf) + register const char *name; + const char *sfile; + struct objfile *objf; +{ + struct objfile *objfile; + struct minimal_symbol *msymbol; + struct minimal_symbol *found_symbol = NULL; + struct minimal_symbol *found_file_symbol = NULL; + +#ifdef SOFUN_ADDRESS_MAYBE_MISSING + if (sfile != NULL) + { + char *p = strrchr (sfile, '/'); + if (p != NULL) + sfile = p + 1; + } +#endif + + for (objfile = object_files; + objfile != NULL && found_symbol == NULL; + objfile = objfile -> next) + { + if (objf == NULL || objf == objfile) + { + for (msymbol = objfile -> msymbols; + msymbol != NULL && SYMBOL_NAME (msymbol) != NULL && + found_symbol == NULL; + msymbol++) + { + if (SYMBOL_MATCHES_NAME (msymbol, name) && + MSYMBOL_TYPE (msymbol) == mst_solib_trampoline) + return msymbol; + } + } + } + + return NULL; +} + + /* Search through the minimal symbol table for each objfile and find the symbol whose address is the largest address that is still less than or equal to PC. Returns a pointer to the minimal symbol if such a symbol |