diff options
author | Ian Lance Taylor <ian@airs.com> | 1993-04-09 18:22:57 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1993-04-09 18:22:57 +0000 |
commit | 545a27683ea1a3a79b1df76502c4e9b5cb55011c (patch) | |
tree | cbd3da85b2f0335271a83209a1b2d77b8c9fd2ac /binutils | |
parent | 21486670ae38f8e47589d1cada833f41f9fef6f9 (diff) | |
download | gdb-545a27683ea1a3a79b1df76502c4e9b5cb55011c.zip gdb-545a27683ea1a3a79b1df76502c4e9b5cb55011c.tar.gz gdb-545a27683ea1a3a79b1df76502c4e9b5cb55011c.tar.bz2 |
Please don't add declarations of random system functions to general
source files if you can possibly avoid it. They inevitably fail on
some system somewhere.
* objdump.c: Removed useless fprintf declaration.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 4 | ||||
-rw-r--r-- | binutils/objdump.c | 31 |
2 files changed, 19 insertions, 16 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 5a8eeb1..53ea5b5 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,7 @@ +Fri Apr 9 11:21:00 1993 Ian Lance Taylor (ian@cygnus.com) + + * objdump.c: Removed useless fprintf declaration. + Wed Apr 7 22:22:50 1993 Rob Savoye (rob@cygnus.com) * Makefile.in: Changed check target to use DejaGnu. diff --git a/binutils/objdump.c b/binutils/objdump.c index ab9bb8d..242d600 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -43,7 +43,6 @@ extern Elf_Internal_Shdr *bfd_elf_find_section(); #endif /* ELF_STAB_DISPLAY */ extern char *xmalloc (); -extern int fprintf PARAMS ((FILE *, CONST char *, ...)); char *default_target = NULL; /* default at runtime */ @@ -209,9 +208,9 @@ comp (ap, bp) /* Print the supplied address symbolically if possible */ void -print_address (vma, stream) +objdump_print_address (vma, info) bfd_vma vma; - FILE *stream; + struct disassemble_info *info; { /* Perform a binary search looking for the closest symbol to the required value */ @@ -226,7 +225,7 @@ print_address (vma, stream) if (symcount == 0) { - fprintf_vma (stream, vma); + fprintf_vma (info->stream, vma); } else { @@ -267,8 +266,8 @@ print_address (vma, stream) && syms[thisplace + 1]->value == vma) match_name = syms[thisplace + 1]->name; /* Totally awesome! the exact right symbol */ - fprintf_vma (stream, vma); - fprintf (stream, " (%s+)0000", syms[thisplace]->name); + fprintf_vma (info->stream, vma); + fprintf (info->stream, " (%s+)0000", syms[thisplace]->name); return; } } @@ -285,16 +284,16 @@ print_address (vma, stream) } } - fprintf_vma (stream, vma); + fprintf_vma (info->stream, vma); if (syms[thisplace]->value > vma) { - fprintf (stream, " (%s-)", syms[thisplace]->name); - fprintf (stream, "%04x", syms[thisplace]->value - vma); + fprintf (info->stream, " (%s-)", syms[thisplace]->name); + fprintf (info->stream, "%04x", syms[thisplace]->value - vma); } else { - fprintf (stream, " (%s+)", syms[thisplace]->name); - fprintf (stream, "%04x", vma - syms[thisplace]->value); + fprintf (info->stream, " (%s+)", syms[thisplace]->name); + fprintf (info->stream, "%04x", vma - syms[thisplace]->value); } } } @@ -309,8 +308,6 @@ disassemble_data (abfd) bfd_size_type i; unsigned int (*print) ()= 0; /* Old style */ disassembler_ftype disassemble = 0; /* New style */ - unsigned int print_insn_a29k (); - unsigned int print_insn_i960 (); unsigned int print_insn_h8300 (); enum bfd_architecture a; struct disassemble_info disasm_info; @@ -324,6 +321,7 @@ disassemble_data (abfd) boolean done_dot = false; INIT_DISASSEMBLE_INFO(disasm_info, stdout); + disasm_info.print_address_func = objdump_print_address; for (i = 0; i < symcount; i++) { @@ -395,10 +393,11 @@ disassemble_data (abfd) disassemble = print_insn_m68k; break; case bfd_arch_a29k: - print = print_insn_a29k; + /* As far as I know we only handle big-endian 29k objects. */ + disassemble = print_insn_big_a29k; break; case bfd_arch_i960: - print = print_insn_i960; + disassemble = print_insn_i960; break; case bfd_arch_mips: if (abfd->xvec->byteorder_big_p) @@ -488,7 +487,7 @@ disassemble_data (abfd) } } } - print_address (section->vma + i, stdout); + objdump_print_address (section->vma + i, &disasm_info); printf (" "); if (disassemble) /* New style */ |