diff options
author | David MacKenzie <djm@cygnus> | 1994-02-17 18:08:41 +0000 |
---|---|---|
committer | David MacKenzie <djm@cygnus> | 1994-02-17 18:08:41 +0000 |
commit | d1ad85a6e6eead5ba7a2950c3d63f39924397353 (patch) | |
tree | 4fb18639d4c1f179c4b1dbcd837525829da1575a /bfd/ecofflink.c | |
parent | 166557e7b19db0013a7ab307a08f2c78cd243144 (diff) | |
download | gdb-d1ad85a6e6eead5ba7a2950c3d63f39924397353.zip gdb-d1ad85a6e6eead5ba7a2950c3d63f39924397353.tar.gz gdb-d1ad85a6e6eead5ba7a2950c3d63f39924397353.tar.bz2 |
* bfd.c (bfd_get_error, bfd_set_error): New functions.
(bfd_error): Make static.
(bfd_error_type): Renamed from bfd_ec. Prepend "bfd_error_" to
all values.
* bfd-in2.h: Regenerated.
* aix386-core.c, aout-adobe.c, aout-encap.c, aout-target.h,
aoutf1.h, aoutx.h, archive.c, archures.c,
bfd.c, bout.c, cache.c, coff-alpha.c, coff-mips.c,
coff-rs6000.c, coffcode.h, coffgen.c, core.c, ctor.c,
ecoff.c, ecofflink.c, elf.c, elf32-hppa.c, elf32-mips.c,
elfcode.h, format.c, hash.c, hp300hpux.c, hppabsd-core.c,
i386lynx.c, ieee.c, libbfd.c, libelf.h, linker.c,
lynx-core.c, nlm.c, nlm32-alpha.c, nlm32-i386.c,
nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
ptrace-core.c, reloc16.c, rs6000-core.c, section.c, som.c,
srec.c, sunos.c, syms.c, targets.c, tekhex.c,
trad-core.c: Change callers.
Diffstat (limited to 'bfd/ecofflink.c')
-rw-r--r-- | bfd/ecofflink.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/bfd/ecofflink.c b/bfd/ecofflink.c index 7fd34cb..d932322 100644 --- a/bfd/ecofflink.c +++ b/bfd/ecofflink.c @@ -74,7 +74,7 @@ ecoff_add_bytes (buf, bufend, need) newbuf = (char *) realloc (*buf, have + want); if (newbuf == NULL) { - bfd_error = no_memory; + bfd_set_error (bfd_error_no_memory); return false; } *buf = newbuf; @@ -117,7 +117,7 @@ string_hash_newfunc (entry, table, string) bfd_hash_allocate (table, sizeof (struct string_hash_entry))); if (ret == (struct string_hash_entry *) NULL) { - bfd_error = no_memory; + bfd_set_error (bfd_error_no_memory); return NULL; } @@ -237,7 +237,7 @@ add_file_shuffle (ainfo, head, tail, input_bfd, offset, size) sizeof (struct shuffle)); if (!n) { - bfd_error = no_memory; + bfd_set_error (bfd_error_no_memory); return false; } n->next = NULL; @@ -276,7 +276,7 @@ add_memory_shuffle (ainfo, head, tail, data, size) sizeof (struct shuffle)); if (!n) { - bfd_error = no_memory; + bfd_set_error (bfd_error_no_memory); return false; } n->next = NULL; @@ -307,7 +307,7 @@ bfd_ecoff_debug_init (output_bfd, output_debug, output_swap, info) ainfo = (struct accumulate *) malloc (sizeof (struct accumulate)); if (!ainfo) { - bfd_error = no_memory; + bfd_set_error (bfd_error_no_memory); return NULL; } if (! bfd_hash_table_init_n (&ainfo->fdr_hash.table, string_hash_newfunc, @@ -346,7 +346,7 @@ bfd_ecoff_debug_init (output_bfd, output_debug, output_swap, info) if (!obstack_begin (&ainfo->memory, 4050)) { - bfd_error = no_memory; + bfd_set_error (bfd_error_no_memory); return NULL; } @@ -478,7 +478,7 @@ bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap, rfd_out = (bfd_byte *) obstack_alloc (&ainfo->memory, sz); if (!input_debug->ifdmap || !rfd_out) { - bfd_error = no_memory; + bfd_set_error (bfd_error_no_memory); return false; } if (!add_memory_shuffle (ainfo, &ainfo->rfd, &ainfo->rfd_end, rfd_out, sz)) @@ -574,7 +574,7 @@ bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap, fdr_out = (bfd_byte *) obstack_alloc (&ainfo->memory, sz); if (!fdr_out) { - bfd_error = no_memory; + bfd_set_error (bfd_error_no_memory); return false; } if (!add_memory_shuffle (ainfo, &ainfo->fdr, &ainfo->fdr_end, fdr_out, sz)) @@ -612,7 +612,7 @@ bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap, sym_out = (bfd_byte *) obstack_alloc (&ainfo->memory, sz); if (!sym_out) { - bfd_error = no_memory; + bfd_set_error (bfd_error_no_memory); return false; } if (!add_memory_shuffle (ainfo, &ainfo->sym, &ainfo->sym_end, sym_out, sz)) @@ -792,7 +792,7 @@ bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap, out = (bfd_byte *) obstack_alloc (&ainfo->memory, sz); if (!out) { - bfd_error = no_memory; + bfd_set_error (bfd_error_no_memory); return false; } if (!add_memory_shuffle (ainfo, &ainfo->pdr, &ainfo->pdr_end, out, sz)) @@ -815,7 +815,7 @@ bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap, out = (bfd_byte *) obstack_alloc (&ainfo->memory, sz); if (!out) { - bfd_error = no_memory; + bfd_set_error (bfd_error_no_memory); return false; } if (!add_memory_shuffle (ainfo, &ainfo->opt, &ainfo->opt_end, out, sz)) @@ -956,7 +956,7 @@ bfd_ecoff_debug_accumulate_other (handle, output_bfd, output_debug, get_symtab_upper_bound (input_bfd)); if (symbols == (asymbol **) NULL) { - bfd_error = no_memory; + bfd_set_error (bfd_error_no_memory); return false; } sym_end = symbols + bfd_canonicalize_symtab (input_bfd, symbols); @@ -992,7 +992,7 @@ bfd_ecoff_debug_accumulate_other (handle, output_bfd, output_debug, output_swap->external_sym_size); if (!external_sym) { - bfd_error = no_memory; + bfd_set_error (bfd_error_no_memory); return false; } (*swap_sym_out) (output_bfd, &internal_sym, external_sym); @@ -1012,7 +1012,7 @@ bfd_ecoff_debug_accumulate_other (handle, output_bfd, output_debug, output_swap->external_fdr_size); if (!external_fdr) { - bfd_error = no_memory; + bfd_set_error (bfd_error_no_memory); return false; } (*output_swap->swap_fdr_out) (output_bfd, &fdr, external_fdr); |