summaryrefslogtreecommitdiff
path: root/gdb/rs6000-nat.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1995-04-12 04:42:05 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1995-04-12 04:42:05 +0000
commit88a5c3fc6b59ce13ed3f1c74c6fddf197616e561 (patch)
treed85ce222b1b11cb204712d8d11a2b9fc55505988 /gdb/rs6000-nat.c
parent99dff294dc114c3b8f489f057591f3de55b6115a (diff)
downloadbinutils-gdb-88a5c3fc6b59ce13ed3f1c74c6fddf197616e561.tar.gz
* rs6000-nat.c (vmap_ldinfo): If we don't find ldinfo for the
symfile_objfile, nuke it.
Diffstat (limited to 'gdb/rs6000-nat.c')
-rw-r--r--gdb/rs6000-nat.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c
index 5a4274d054b..6b940520858 100644
--- a/gdb/rs6000-nat.c
+++ b/gdb/rs6000-nat.c
@@ -465,8 +465,9 @@ vmap_ldinfo (ldi)
{
struct stat ii, vi;
register struct vmap *vp;
- register got_one, retried;
+ int got_one, retried;
CORE_ADDR ostart;
+ int got_exec_file;
/* For each *ldi, see if we have a corresponding *vp.
If so, update the mapping, and symbol table.
@@ -530,6 +531,10 @@ vmap_ldinfo (ldi)
vp->tend += vp->tadj;
}
+ /* The objfile is only NULL for the exec file. */
+ if (vp->objfile == NULL)
+ got_exec_file = 1;
+
/* relocate symbol table(s). */
vmap_symtab (vp);
@@ -550,15 +555,7 @@ vmap_ldinfo (ldi)
is unlikely that the symbol file is relocated to the proper
address. And we might have attached to a process which is
running a different copy of the same executable. */
- for (got_one = 0, vp = vmap; vp != NULL; vp = vp->nxt)
- {
- if (symfile_objfile == vp->objfile)
- {
- got_one = 1;
- break;
- }
- }
- if (symfile_objfile != NULL && !got_one)
+ if (symfile_objfile != NULL && !got_exec_file)
{
warning_begin ();
fputs_unfiltered ("Symbol file ", gdb_stderr);