diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-03-17 04:07:29 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-03-17 04:07:29 +0000 |
commit | 8112a7114bbc5a98ec2069a28e1aae1de98ff99e (patch) | |
tree | 3309214df53c4824e059d54599fff6ec2942111c /gdb/xcoffexec.c | |
parent | c84a96d741333973aebd4286a2f77a5b783d6ab5 (diff) | |
download | gdb-8112a7114bbc5a98ec2069a28e1aae1de98ff99e.zip gdb-8112a7114bbc5a98ec2069a28e1aae1de98ff99e.tar.gz gdb-8112a7114bbc5a98ec2069a28e1aae1de98ff99e.tar.bz2 |
* xcoffexec.c (add_vmap): Wrap symbol read in catch_errors.
Diffstat (limited to 'gdb/xcoffexec.c')
-rw-r--r-- | gdb/xcoffexec.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/gdb/xcoffexec.c b/gdb/xcoffexec.c index 96bd97f..db658e0 100644 --- a/gdb/xcoffexec.c +++ b/gdb/xcoffexec.c @@ -465,6 +465,17 @@ CORE_ADDR old_start; } } +/* Add symbols for an objfile. */ +static int +objfile_symbol_add (arg) + char *arg; +{ + struct objfile *obj = (struct objfile *) arg; + syms_from_objfile (obj, 0, 0, 0); + new_symfile_objfile (obj, 0, 0); + return 1; +} + static struct vmap *add_vmap PARAMS ((struct ld_info *)); /* Add a new vmap entry based on ldinfo() information. @@ -540,10 +551,13 @@ add_vmap(ldi) vp->objfile = obj; #ifndef SOLIB_SYMBOLS_MANUAL - syms_from_objfile (obj, 0, 0, 0); - new_symfile_objfile (obj, 0, 0); - vmap_symtab (vp, 0, 0); - vp->loaded = 1; + if (catch_errors (objfile_symbol_add, (char *)obj, + "Error while reading shared library symbols:\n")) + { + /* Note this is only done if symbol reading was successful. */ + vmap_symtab (vp, 0, 0); + vp->loaded = 1; + } #endif return vp; } |