diff options
author | Peter Schauer <Peter.Schauer@mytum.de> | 1994-03-15 21:46:32 +0000 |
---|---|---|
committer | Peter Schauer <Peter.Schauer@mytum.de> | 1994-03-15 21:46:32 +0000 |
commit | ae6d035d284f36a654186f284ead34a246eb86de (patch) | |
tree | 81117ce5058d3d7984ef902010a3d4b4a39c63c2 /gdb/symtab.c | |
parent | f1b4e13156bf7987b306aaacc649e66e26f3c5f6 (diff) | |
download | gdb-ae6d035d284f36a654186f284ead34a246eb86de.zip gdb-ae6d035d284f36a654186f284ead34a246eb86de.tar.gz gdb-ae6d035d284f36a654186f284ead34a246eb86de.tar.bz2 |
For Sunos 4.x targets, enable gdb to set breakpoints in shared
library functions before the executable is run. Retrieve dynamic
symbols from stripped executables.
* symtab.h (minimal_symbol_type): Add mst_solib_trampoline type.
* parse.c (write_exp_msymbol), symmisc.c (dump_msymbols),
symtab.c (list_symbols): Handle mst_solib_trampoline.
* minsyms.c (lookup_minimal_symbol): Handle mst_solib_trampoline
for all targets, remove IBM6000_TARGET dependencies.
* dbxread.c (read_dbx_dynamic_symtab): New function.
* dbxread.c (dbx_symfile_read): Use it.
* dbxread.c (SET_NAMESTRING): Set namestring to
"<bad string table index>" instead of "foo" if the string index is
corrupt.
* xcoffread.c (read_xcoff_symtab): Use mst_solib_trampoline instead
of mst_unknown.
* symtab.c (list_symbols): Take from_tty as parameter and pass it
to break_command. Handle mst_file_* minimal symbol types.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r-- | gdb/symtab.c | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c index 357b349..f9eaf86 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -73,7 +73,7 @@ static void sources_info PARAMS ((char *, int)); static void -list_symbols PARAMS ((char *, int, int)); +list_symbols PARAMS ((char *, int, int, int)); static void output_source_filename PARAMS ((char *, int *)); @@ -2517,10 +2517,11 @@ sources_info (ignore, from_tty) we find. */ static void -list_symbols (regexp, class, bpt) +list_symbols (regexp, class, bpt, from_tty) char *regexp; int class; int bpt; + int from_tty; { register struct symtab *s; register struct partial_symtab *ps; @@ -2540,9 +2541,15 @@ list_symbols (regexp, class, bpt) static enum minimal_symbol_type types[] = {mst_data, mst_text, mst_abs, mst_unknown}; static enum minimal_symbol_type types2[] - = {mst_bss, mst_text, mst_abs, mst_unknown}; + = {mst_bss, mst_file_text, mst_abs, mst_unknown}; + static enum minimal_symbol_type types3[] + = {mst_file_data, mst_solib_trampoline, mst_abs, mst_unknown}; + static enum minimal_symbol_type types4[] + = {mst_file_bss, mst_text, mst_abs, mst_unknown}; enum minimal_symbol_type ourtype = types[class]; enum minimal_symbol_type ourtype2 = types2[class]; + enum minimal_symbol_type ourtype3 = types3[class]; + enum minimal_symbol_type ourtype4 = types4[class]; if (regexp != NULL) { @@ -2643,7 +2650,9 @@ list_symbols (regexp, class, bpt) ALL_MSYMBOLS (objfile, msymbol) { if (MSYMBOL_TYPE (msymbol) == ourtype || - MSYMBOL_TYPE (msymbol) == ourtype2) + MSYMBOL_TYPE (msymbol) == ourtype2 || + MSYMBOL_TYPE (msymbol) == ourtype3 || + MSYMBOL_TYPE (msymbol) == ourtype4) { if (regexp == NULL || SYMBOL_MATCHES_REGEXP (msymbol)) { @@ -2710,7 +2719,7 @@ list_symbols (regexp, class, bpt) strcpy (string, s->filename); strcat (string, ":"); strcat (string, SYMBOL_NAME(sym)); - break_command (string, 0); + break_command (string, from_tty); } } else if (!found_in_file) @@ -2768,7 +2777,9 @@ list_symbols (regexp, class, bpt) ALL_MSYMBOLS (objfile, msymbol) { if (MSYMBOL_TYPE (msymbol) == ourtype || - MSYMBOL_TYPE (msymbol) == ourtype2) + MSYMBOL_TYPE (msymbol) == ourtype2 || + MSYMBOL_TYPE (msymbol) == ourtype3 || + MSYMBOL_TYPE (msymbol) == ourtype4) { if (regexp == NULL || SYMBOL_MATCHES_REGEXP (msymbol)) { @@ -2802,7 +2813,7 @@ variables_info (regexp, from_tty) char *regexp; int from_tty; { - list_symbols (regexp, 0, 0); + list_symbols (regexp, 0, 0, from_tty); } static void @@ -2810,7 +2821,7 @@ functions_info (regexp, from_tty) char *regexp; int from_tty; { - list_symbols (regexp, 1, 0); + list_symbols (regexp, 1, 0, from_tty); } static void @@ -2818,7 +2829,7 @@ types_info (regexp, from_tty) char *regexp; int from_tty; { - list_symbols (regexp, 2, 0); + list_symbols (regexp, 2, 0, from_tty); } #if 0 @@ -2827,7 +2838,7 @@ static void methods_info (regexp) char *regexp; { - list_symbols (regexp, 3, 0); + list_symbols (regexp, 3, 0, from_tty); } #endif /* 0 */ @@ -2837,7 +2848,7 @@ rbreak_command (regexp, from_tty) char *regexp; int from_tty; { - list_symbols (regexp, 1, 1); + list_symbols (regexp, 1, 1, from_tty); } |