aboutsummaryrefslogtreecommitdiff
path: root/gdb/rs6000-nat.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1995-05-18 05:24:29 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1995-05-18 05:24:29 +0000
commitfb494327894be28eab9f84a977c3c45acced545e (patch)
tree482014c1191d40c44203a8822b3786933b51af4d /gdb/rs6000-nat.c
parent8558c4e316f5e6f37e772004dd4b31cd133851b4 (diff)
downloadgdb-fb494327894be28eab9f84a977c3c45acced545e.zip
gdb-fb494327894be28eab9f84a977c3c45acced545e.tar.gz
gdb-fb494327894be28eab9f84a977c3c45acced545e.tar.bz2
* Makefile.in (xcoffread.o): Depend on partial-stab.h.
* xcoffsolib.c (sharedlibrary_command): New command. * xcoffsolib.c (solib_info): Call xcoff_relocate_symtab. * xcoffsolib.c: Miscellaneous cleanups. * partial-stab.h: Ignore symbol descriptor '-' (for local variables with negative type numbers) without complaint. * rs6000-nat.c (vmap_ldinfo): Use bfd_stat rather than our own local emulation thereof. Remove unused variable ostart.
Diffstat (limited to 'gdb/rs6000-nat.c')
-rw-r--r--gdb/rs6000-nat.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c
index 042f7ee..8fac1d8 100644
--- a/gdb/rs6000-nat.c
+++ b/gdb/rs6000-nat.c
@@ -435,7 +435,6 @@ vmap_ldinfo (ldi)
struct stat ii, vi;
register struct vmap *vp;
int got_one, retried;
- CORE_ADDR ostart;
int got_exec_file;
/* For each *ldi, see if we have a corresponding *vp.
@@ -453,8 +452,6 @@ vmap_ldinfo (ldi)
retry:
for (got_one = 0, vp = vmap; vp; vp = vp->nxt)
{
- FILE *io;
-
/* First try to find a `vp', which is the same as in ldinfo.
If not the same, just continue and grep the next `vp'. If same,
relocate its tstart, tend, dstart, dend values. If no such `vp'
@@ -467,14 +464,14 @@ vmap_ldinfo (ldi)
|| (memb[0] && !STREQ(memb, vp->member)))
continue;
- io = bfd_cache_lookup (vp->bfd); /* totally opaque! */
- if (!io)
- fatal ("cannot find BFD's iostream for %s", vp->name);
-
/* See if we are referring to the same file. */
- /* An error here is innocuous, most likely meaning that
- the file descriptor has become worthless. */
- if (fstat (fileno(io), &vi) < 0)
+ if (bfd_stat (vp->bfd, &vi) < 0)
+ /* An error here is innocuous, most likely meaning that
+ the file descriptor has become worthless.
+ FIXME: What does it mean for a file descriptor to become
+ "worthless"? What makes it happen? What error does it
+ produce (ENOENT? others?)? Should we at least provide
+ a warning? */
continue;
if (ii.st_dev != vi.st_dev || ii.st_ino != vi.st_ino)
@@ -485,8 +482,7 @@ vmap_ldinfo (ldi)
++got_one;
- /* found a corresponding VMAP. remap! */
- ostart = vp->tstart;
+ /* Found a corresponding VMAP. Remap! */
/* We can assume pointer == CORE_ADDR, this code is native only. */
vp->tstart = (CORE_ADDR) ldi->ldinfo_textorg;
@@ -507,7 +503,7 @@ vmap_ldinfo (ldi)
/* relocate symbol table(s). */
vmap_symtab (vp);
- /* there may be more, so we don't break out of the loop. */
+ /* There may be more, so we don't break out of the loop. */
}
/* if there was no matching *vp, we must perforce create the sucker(s) */