From 76212295984365ba3f767cf7c99d1d535360fb99 Mon Sep 17 00:00:00 2001 From: Peter Schauer Date: Sat, 8 Oct 1994 11:54:29 +0000 Subject: Speed up GDB startup time by not demangling partial symbols. * symfile.h (ADD_PSYMBOL_VT_TO_LIST), symfile.c (add_psymbol_to_list, add_psymbol_addr_to_list): No longer demangle partial symbols. * symtab.c (lookup_symbol, list_symbols): Handle mangled variables, e.g. C++ static members, via the minimal symbols. Handle reordered functions in an objfile, for Irix 5.2 shared libraries. * objfiles.h (OBJF_REORDERED): New bit in the objfile flags, set if the functions in an objfile are reordered. * mdebugread.c (parse_partial_symbols): Detect reordered functions in an objfile. * symtab.c (find_pc_psymtab, find_pc_symtab): Use expensive lookup algorithm if the functions in the objfile are reordered. * xcoffexec.c (exec_close): If the current target has a copy of the exec_ops sections, reflect the freeing of the sections in current_target. * valops.c (call_function_by_hand): Use `sizeof dummy1', not `sizeof dummy', for constructing the call dummy code. * config/sparc/tm-sparc.h: Add PARAMS declarations to all function declarations. * sparc-tdep.c (sparc_pop_frame): Cast result of read_memory_integer to CORE_ADDR when passing it to PC_ADJUST. * irix5-nat.c (enable_break): Set breakpoint at the entry point of the executable, to handle the case where main resides in a shared library. * irix5-nat.c (solib_create_inferior_hook): Reset stop_soon_quietly after shared library symbol reading, to get rid of a warning from heuristic_proc_start if the startup code has no symbolic debug info. * breakpoint.h (struct breakpoint): Add new fields language and input_radix, to enable breakpoint resetting with the proper language and radix. * breakpoint.c (set_raw_breakpoint): Initialize them. (breakpoint_re_set_one): Use them when resetting the breakpoint. (breakpoint_re_set): Preserve current language and input_radix across breakpoint_re_set_one calls. * symtab.c (decode_line_1): Do not build a canonical line specification for `*expr' line specifications. * breakpoint.h (bpstat_stop_status): Fix prototype declaration. --- gdb/mdebugread.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'gdb/mdebugread.c') diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c index 5d1325d..7b30ec3 100644 --- a/gdb/mdebugread.c +++ b/gdb/mdebugread.c @@ -2793,6 +2793,35 @@ parse_partial_symbols (objfile, section_offsets) objfile->ei.entry_file_lowpc = save_pst->textlow; objfile->ei.entry_file_highpc = save_pst->texthigh; } + + /* The objfile has its functions reordered if this partial symbol + table overlaps any other partial symbol table. + We cannot assume a reordered objfile if a partial symbol table + is contained within another partial symbol table, as partial symbol + tables for include files with executable code are contained + within the partial symbol table for the including source file, + and we do not want to flag the objfile reordered for these cases. + + This strategy works well for Irix-5.2 shared libraries, but we + might have to use a more elaborate (and slower) algorithm for + other cases. */ + save_pst = fdr_to_pst[f_idx].pst; + if (save_pst != NULL + && save_pst->textlow != 0 + && !(objfile->flags & OBJF_REORDERED)) + { + ALL_OBJFILE_PSYMTABS (objfile, pst) + { + if (save_pst != pst + && save_pst->textlow >= pst->textlow + && save_pst->textlow < pst->texthigh + && save_pst->texthigh > pst->texthigh) + { + objfile->flags |= OBJF_REORDERED; + break; + } + } + } } /* Now scan the FDRs for dependencies */ -- cgit v1.1