aboutsummaryrefslogtreecommitdiff
path: root/gdb/xcoffexec.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/xcoffexec.c')
-rw-r--r--gdb/xcoffexec.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/gdb/xcoffexec.c b/gdb/xcoffexec.c
index 3853486..5c47ba1 100644
--- a/gdb/xcoffexec.c
+++ b/gdb/xcoffexec.c
@@ -410,7 +410,7 @@ static struct vmap *
add_vmap(ldi)
register struct ld_info *ldi;
{
- bfd *bfd, *last;
+ bfd *abfd, *last;
register char *mem, *objname;
struct objfile *obj;
struct vmap *vp;
@@ -426,32 +426,32 @@ add_vmap(ldi)
if (ldi->ldinfo_fd < 0)
/* Note that this opens it once for every member; a possible
enhancement would be to only open it once for every object. */
- bfd = bfd_openr (objname, gnutarget);
+ abfd = bfd_openr (objname, gnutarget);
else
- bfd = bfd_fdopenr(objname, gnutarget, ldi->ldinfo_fd);
- if (!bfd)
+ abfd = bfd_fdopenr(objname, gnutarget, ldi->ldinfo_fd);
+ if (!abfd)
error("Could not open `%s' as an executable file: %s",
objname, bfd_errmsg(bfd_error));
/* make sure we have an object file */
- if (bfd_check_format(bfd, bfd_object))
- vp = map_vmap (bfd, 0);
+ if (bfd_check_format(abfd, bfd_object))
+ vp = map_vmap (abfd, 0);
- else if (bfd_check_format(bfd, bfd_archive)) {
+ else if (bfd_check_format(abfd, bfd_archive)) {
last = 0;
/*
* FIXME??? am I tossing BFDs? bfd?
*/
- while (last = bfd_openr_next_archived_file(bfd, last))
+ while (last = bfd_openr_next_archived_file(abfd, last))
if (STREQ(mem, last->filename))
break;
if (!last) {
- bfd_close(bfd);
+ bfd_close(abfd);
/* FIXME -- should be error */
- warning("\"%s\": member \"%s\" missing.", bfd->filename, mem);
+ warning("\"%s\": member \"%s\" missing.", abfd->filename, mem);
return;
}
@@ -460,16 +460,16 @@ add_vmap(ldi)
goto obj_err;
}
- vp = map_vmap (last, bfd);
+ vp = map_vmap (last, abfd);
}
else {
obj_err:
- bfd_close(bfd);
+ bfd_close(abfd);
error ("\"%s\": not in executable format: %s.",
objname, bfd_errmsg(bfd_error));
/*NOTREACHED*/
}
- obj = allocate_objfile (vp->bfd, 0);
+ obj = allocate_objfile (vp->abfd, 0);
vp->objfile = obj;
#ifndef SOLIB_SYMBOLS_MANUAL
@@ -591,7 +591,7 @@ retry:
|| (memb[0] && !STREQ(memb, vp->member)))
continue;
- io = bfd_cache_lookup(vp->bfd); /* totally opaque! */
+ io = bfd_cache_lookup(vp->abfd); /* totally opaque! */
if (!io)
fatal("cannot find BFD's iostream for %s", vp->name);
@@ -695,7 +695,7 @@ xfer_memory (memaddr, myaddr, len, write, target)
if (p->endaddr >= memend)
{
/* Entire transfer is within this section. */
- res = xfer_fn (p->bfd, p->sec_ptr, myaddr, memaddr - p->addr, len);
+ res = xfer_fn (p->abfd, p->sec_ptr, myaddr, memaddr - p->addr, len);
return (res != false)? len: 0;
}
else if (p->endaddr <= memaddr)
@@ -707,7 +707,7 @@ xfer_memory (memaddr, myaddr, len, write, target)
{
/* This section overlaps the transfer. Just do half. */
len = p->endaddr - memaddr;
- res = xfer_fn (p->bfd, p->sec_ptr, myaddr, memaddr - p->addr, len);
+ res = xfer_fn (p->abfd, p->sec_ptr, myaddr, memaddr - p->addr, len);
return (res != false)? len: 0;
}
else if (p->addr < nextsectaddr)
@@ -739,9 +739,9 @@ print_section_info (t, abfd)
if (info_verbose)
printf_filtered (" @ %s",
local_hex_string_custom ((unsigned long) p->sec_ptr->filepos, "08l"));
- printf_filtered (" is %s", bfd_section_name (p->bfd, p->sec_ptr));
- if (p->bfd != abfd) {
- printf_filtered (" in %s", bfd_get_filename (p->bfd));
+ printf_filtered (" is %s", bfd_section_name (p->abfd, p->sec_ptr));
+ if (p->abfd != abfd) {
+ printf_filtered (" in %s", bfd_get_filename (p->abfd));
}
printf_filtered ("\n");
}
@@ -808,8 +808,8 @@ char *args;
for (vp = vmap; vp; vp = vp->nxt) {
if (!strncmp(secname
- , bfd_section_name(vp->bfd, vp->sex), seclen)
- && bfd_section_name(vp->bfd, vp->sex)[seclen] == '\0') {
+ , bfd_section_name(vp->abfd, vp->sex), seclen)
+ && bfd_section_name(vp->abfd, vp->sex)[seclen] == '\0') {
offset = secaddr - vp->tstart;
vp->tstart += offset;
vp->tend += offset;
@@ -1001,16 +1001,16 @@ bfd_err:
So for text sections, bfd_section_vma tends to be 0x200,
and if vp->tstart is 0xd0002000, then the first byte of
the text section on disk corresponds to address 0xd0002200. */
- stp->bfd = vp->bfd;
- stp->sec_ptr = bfd_get_section_by_name (stp->bfd, ".text");
- stp->addr = bfd_section_vma (stp->bfd, stp->sec_ptr) + vp->tstart;
- stp->endaddr = bfd_section_vma (stp->bfd, stp->sec_ptr) + vp->tend;
+ stp->abfd = vp->abfd;
+ stp->sec_ptr = bfd_get_section_by_name (stp->abfd, ".text");
+ stp->addr = bfd_section_vma (stp->abfd, stp->sec_ptr) + vp->tstart;
+ stp->endaddr = bfd_section_vma (stp->abfd, stp->sec_ptr) + vp->tend;
stp++;
- stp->bfd = vp->bfd;
- stp->sec_ptr = bfd_get_section_by_name (stp->bfd, ".data");
- stp->addr = bfd_section_vma (stp->bfd, stp->sec_ptr) + vp->dstart;
- stp->endaddr = bfd_section_vma (stp->bfd, stp->sec_ptr) + vp->dend;
+ stp->abfd = vp->abfd;
+ stp->sec_ptr = bfd_get_section_by_name (stp->abfd, ".data");
+ stp->addr = bfd_section_vma (stp->abfd, stp->sec_ptr) + vp->dstart;
+ stp->endaddr = bfd_section_vma (stp->abfd, stp->sec_ptr) + vp->dend;
}
vmap_symtab (vp);