aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>1992-01-30 03:56:32 +0000
committerPer Bothner <per@bothner.com>1992-01-30 03:56:32 +0000
commitd4ea2aba3a76716e9682fda8251515f7bc02f869 (patch)
tree388acb9bfdf35f0f0f1052e8453b4765a0d649d2 /gdb/symfile.c
parent0515163751bed58f8c5023b56362ccfb1dfbe555 (diff)
downloadgdb-d4ea2aba3a76716e9682fda8251515f7bc02f869.zip
gdb-d4ea2aba3a76716e9682fda8251515f7bc02f869.tar.gz
gdb-d4ea2aba3a76716e9682fda8251515f7bc02f869.tar.bz2
Various fixed triggered by trying to do the right thing wrt
to external symbols in mips ecoff binaries. See ChangeLog.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c52
1 files changed, 49 insertions, 3 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 8f5b5b3..8745796 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -602,7 +602,7 @@ symbol_file_add (name, from_tty, addr, mainline)
&& !query ("Load new symbol table from \"%s\"? ", name))
error ("Not confirmed.");
- if (from_tty)
+ if (from_tty || info_verbose)
{
printf_filtered ("Reading symbols from %s...", name);
wrap_here ("");
@@ -611,7 +611,7 @@ symbol_file_add (name, from_tty, addr, mainline)
syms_from_objfile (objfile, addr, mainline, from_tty);
- if (from_tty)
+ if (from_tty || info_verbose)
{
printf_filtered ("done.\n");
fflush (stdout);
@@ -875,7 +875,6 @@ reread_symbols ()
for (objfile = object_files; objfile; objfile = objfile->next) {
if (objfile->obfd) {
- objfile->obfd->mtime_set = false; /* Force it to reread. */
new_modtime = bfd_get_mtime (objfile->obfd);
if (new_modtime != objfile->mtime) {
printf_filtered ("`%s' has changed; re-reading symbols.\n",
@@ -1255,6 +1254,53 @@ again2:
return blewit;
}
+/* Allocate and partially fill a partial symtab. It will be
+ completely filled at the end of the symbol list.
+
+ SYMFILE_NAME is the name of the symbol-file we are reading from, and ADDR
+ is the address relative to which its symbols are (incremental) or 0
+ (normal). */
+
+
+struct partial_symtab *
+start_psymtab_common (objfile, addr,
+ filename, textlow, global_syms, static_syms)
+ struct objfile *objfile;
+ CORE_ADDR addr;
+ char *filename;
+ CORE_ADDR textlow;
+ struct partial_symbol *global_syms;
+ struct partial_symbol *static_syms;
+{
+ int filename_length = strlen (filename) + 1;
+ struct partial_symtab *result =
+ (struct partial_symtab *) obstack_alloc (psymbol_obstack,
+ sizeof (struct partial_symtab));
+
+ result->addr = addr;
+
+ result->filename = (char *) obstack_alloc (psymbol_obstack, filename_length);
+ memcpy (result->filename, filename, filename_length);
+
+ result->textlow = textlow;
+
+ result->readin = 0;
+ result->symtab = NULL;
+
+ result->globals_offset = global_syms - global_psymbols.list;
+ result->statics_offset = static_syms - static_psymbols.list;
+
+ result->n_global_syms = 0;
+ result->n_static_syms = 0;
+
+ /* Chain it to the list owned by the current object file. */
+ result->objfile = objfile;
+ result->objfile_chain = objfile->psymtabs;
+ objfile->psymtabs = result;
+
+ return result;
+}
+
/*
* Free all partial_symtab storage.
*/