aboutsummaryrefslogtreecommitdiff
path: root/gdb/xcoffexec.c
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1992-11-19 00:04:44 +0000
committerJohn Gilmore <gnu@cygnus>1992-11-19 00:04:44 +0000
commitcbf15d9a3d17b25498f02fd44eaea1d368d4ebdf (patch)
tree535a0b3dbe904a26bb5b74baa7a631528a72b03b /gdb/xcoffexec.c
parent195b44d9bc9d4049f18fc98c0f90d7579de1e7e8 (diff)
downloadgdb-cbf15d9a3d17b25498f02fd44eaea1d368d4ebdf.zip
gdb-cbf15d9a3d17b25498f02fd44eaea1d368d4ebdf.tar.gz
gdb-cbf15d9a3d17b25498f02fd44eaea1d368d4ebdf.tar.bz2
* infcmd.c (set_environment_command): Avoid skipping first
char of env value if an '=' appears in it. Bug report and fix by Mark Jungerman, <maj@lucid.com>. Thu Nov 5 23:04:38 1992 Rob Ryan (rr2b@andrew.cmu.edu) * xcoffexec.c (vmap_symtab): fixed a bug where if a object has no member, and the stat pointer passed to vmap_symtab was NULL, the wrong vmap entries would be modified. Fixes behavior where attempting to load symbols for a module with no member would mess up already read in symbols.
Diffstat (limited to 'gdb/xcoffexec.c')
-rw-r--r--gdb/xcoffexec.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/gdb/xcoffexec.c b/gdb/xcoffexec.c
index 6187a59..3b2c7a6 100644
--- a/gdb/xcoffexec.c
+++ b/gdb/xcoffexec.c
@@ -392,27 +392,28 @@ struct stat *vip;
} else if (vp->member[0]) {
/* no match, and member present, not this one. */
continue;
- } else {
+ } else if (vip) {
+ /* No match, and no member. need to be sure.
+ If we were given a stat structure, see if the open file
+ underlying this BFD matches. */
struct stat si;
FILE *io;
- /*
- * no match, and no member. need to be sure.
- */
io = bfd_cache_lookup(objfile->obfd);
if (!io)
fatal("cannot find BFD's iostream for sym");
- /*
- * see if we are referring to the same file
- */
+
+ /* see if we are referring to the same file */
if (fstat(fileno(io), &si) < 0)
fatal("cannot fstat BFD for sym");
- if (vip && (si.st_dev != vip->st_dev
+ if ((si.st_dev != vip->st_dev
|| si.st_ino != vip->st_ino))
continue;
+ } else {
+ continue; /* No stat struct: no way to match it */
}
-
+
if (vp->tstart != old_start) {
/* Once we find a relocation base address for one of the symtabs