aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorPeter Schauer <Peter.Schauer@mytum.de>1994-10-08 11:54:29 +0000
committerPeter Schauer <Peter.Schauer@mytum.de>1994-10-08 11:54:29 +0000
commit76212295984365ba3f767cf7c99d1d535360fb99 (patch)
treeadbbde523d4e3016a6ce2b59d15eeb2997daac6e /gdb/symfile.c
parent15a90f75cbf0e00e49b7900d5e317a57b46de265 (diff)
downloadgdb-76212295984365ba3f767cf7c99d1d535360fb99.zip
gdb-76212295984365ba3f767cf7c99d1d535360fb99.tar.gz
gdb-76212295984365ba3f767cf7c99d1d535360fb99.tar.bz2
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.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 577aaa4..24e7c6e 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -620,11 +620,6 @@ symbol_file_add (name, from_tty, addr, mainline, mapped, readnow)
}
new_symfile_objfile (objfile, mainline, from_tty);
-
- /* Getting new symbols may change our opinion about what is
- frameless. */
-
- reinit_frame_cache ();
return (objfile);
}
@@ -710,6 +705,11 @@ symbol_file_command (args, from_tty)
else
symbol_file_add (name, from_tty, (CORE_ADDR)text_relocation,
0, mapped, readnow);
+
+ /* Getting new symbols may change our opinion about what is
+ frameless. */
+ reinit_frame_cache ();
+
set_initial_language ();
}
argv++;
@@ -1025,6 +1025,10 @@ add_symbol_file_command (args, from_tty)
error ("Not confirmed.");
symbol_file_add (name, 0, text_addr, 0, mapped, readnow);
+
+ /* Getting new symbols may change our opinion about what is
+ frameless. */
+ reinit_frame_cache ();
}
static void
@@ -1079,6 +1083,7 @@ reread_symbols ()
struct section_offsets *offsets;
int num_offsets;
int section_offsets_size;
+ char *obfd_filename;
printf_filtered ("`%s' has changed; re-reading symbols.\n",
objfile->name);
@@ -1100,9 +1105,10 @@ reread_symbols ()
/* Clean up any state BFD has sitting around. We don't need
to close the descriptor but BFD lacks a way of closing the
BFD without closing the descriptor. */
+ obfd_filename = bfd_get_filename (objfile->obfd);
if (!bfd_close (objfile->obfd))
error ("Can't close BFD for %s.", objfile->name);
- objfile->obfd = bfd_openr (objfile->name, gnutarget);
+ objfile->obfd = bfd_openr (obfd_filename, gnutarget);
if (objfile->obfd == NULL)
error ("Can't open %s to read symbols.", objfile->name);
/* bfd_openr sets cacheable to true, which is what we want. */
@@ -1237,6 +1243,8 @@ deduce_language_from_filename (filename)
return language_cplus;
else if (STREQ (c, ".ch") || STREQ (c, ".c186") || STREQ (c, ".c286"))
return language_chill;
+ else if (STREQ (c, ".f") || STREQ (c, ".F"))
+ return language_fortran;
else if (STREQ (c, ".mod"))
return language_m2;
else if (STREQ (c, ".s") || STREQ (c, ".S"))
@@ -1603,7 +1611,7 @@ add_psymbol_to_list (name, namelength, namespace, class, list, val, language,
SYMBOL_LANGUAGE (psym) = language;
PSYMBOL_NAMESPACE (psym) = namespace;
PSYMBOL_CLASS (psym) = class;
- SYMBOL_INIT_DEMANGLED_NAME (psym, &objfile->psymbol_obstack);
+ SYMBOL_INIT_LANGUAGE_SPECIFIC (psym, language);
}
/* Add a symbol with a CORE_ADDR value to a psymtab. */
@@ -1637,7 +1645,7 @@ add_psymbol_addr_to_list (name, namelength, namespace, class, list, val,
SYMBOL_LANGUAGE (psym) = language;
PSYMBOL_NAMESPACE (psym) = namespace;
PSYMBOL_CLASS (psym) = class;
- SYMBOL_INIT_DEMANGLED_NAME (psym, &objfile->psymbol_obstack);
+ SYMBOL_INIT_LANGUAGE_SPECIFIC (psym, language);
}
#endif /* !INLINE_ADD_PSYMBOL */