aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2002-03-19 03:51:06 +0000
committerMichael Snyder <msnyder@vmware.com>2002-03-19 03:51:06 +0000
commit75245b24192bbe28d7baa9dc96d218085c49194f (patch)
treea76e1bdf3b3b04d76e0376b173594ffe4754d8b5 /gdb
parent349c5d5f6c08699c3e433b28e2beaa24b65a63b0 (diff)
downloadgdb-75245b24192bbe28d7baa9dc96d218085c49194f.zip
gdb-75245b24192bbe28d7baa9dc96d218085c49194f.tar.gz
gdb-75245b24192bbe28d7baa9dc96d218085c49194f.tar.bz2
2002-03-14 Michael Snyder <msnyder@redhat.com>
* symfile.c (syms_from_objfile): Return immediately if no syms. (symbol_file_add): Return immediately if no syms. (find_sym_fns): Return immediately if no syms.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/symfile.c11
2 files changed, 17 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0db58f3..da16045 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -114,6 +114,12 @@
* MAINTAINERS: Add myself to write-after-approval.
+2002-03-14 Michael Snyder <msnyder@redhat.com>
+
+ * symfile.c (syms_from_objfile): Return immediately if no syms.
+ (symbol_file_add): Return immediately if no syms.
+ (find_sym_fns): Return immediately if no syms.
+
2002-03-13 Michal Ludvig <mludvig@suse.cz>
* gdbserver/remote-util.c (remote_open): Print remote-side's
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 568b821..985d80b 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -577,6 +577,9 @@ syms_from_objfile (struct objfile *objfile, struct section_addr_info *addrs,
init_entry_point_info (objfile);
find_sym_fns (objfile);
+ if (objfile->sf == NULL)
+ return; /* No symbols. */
+
/* Make sure that partially constructed symbol tables will be cleaned up
if an error occurs during symbol reading. */
old_chain = make_cleanup_free_objfile (objfile);
@@ -858,6 +861,9 @@ symbol_file_add (char *name, int from_tty, struct section_addr_info *addrs,
syms_from_objfile (objfile, addrs, mainline, from_tty);
}
+ if (objfile->sf == NULL)
+ return objfile; /* No symbols. */
+
/* We now have at least a partial symbol table. Check to see if the
user requested that all symbols be read on initial access via either
the gdb startup command line or on a per symbol file basis. Expand
@@ -1134,6 +1140,11 @@ find_sym_fns (struct objfile *objfile)
enum bfd_flavour our_flavour = bfd_get_flavour (objfile->obfd);
char *our_target = bfd_get_target (objfile->obfd);
+ if (our_flavour == bfd_target_srec_flavour
+ || our_flavour == bfd_target_ihex_flavour
+ || our_flavour == bfd_target_tekhex_flavour)
+ return; /* No symbols. */
+
/* Special kludge for apollo. See dstread.c. */
if (STREQN (our_target, "apollo", 6))
our_flavour = (enum bfd_flavour) -2;