This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: objdump.c calls which do not use internal text streams


Hi JG,

> In objdump.c I have noticed printf() used here when such effort is
> is generally made to send all output through the 2 streams
> configured setup in INIT_DISASSEMBLE_INFO().  Is this an exception?

No it is a bug.  I am applying the patch below to fix it.

Cheers
         Nick

2003-03-17  Nick Clifton  <nickc at redhat dot com>

	* objdump.c (disassemble_data): Use disasm_info.fprintf_func not
	printf for emitting new lines.

Index: binutils/objdump.c
===================================================================
RCS file: /cvs/src/src/binutils/objdump.c,v
retrieving revision 1.62
diff -c -3 -p -w -r1.62 objdump.c
*** binutils/objdump.c	13 Feb 2003 09:53:07 -0000	1.62
--- binutils/objdump.c	17 Mar 2003 11:14:27 -0000
*************** disassemble_data (abfd)
*** 1728,1739 ****
  
  	  if (! prefix_addresses)
  	    {
! 	      printf ("\n");
  	      objdump_print_addr_with_sym (abfd, section, sym,
  					   section->vma + addr_offset,
  					   &disasm_info,
  					   FALSE);
! 	      printf (":\n");
  	    }
  
  	  if (sym != NULL && bfd_asymbol_value (sym) > section->vma + addr_offset)
--- 1728,1739 ----
  
  	  if (! prefix_addresses)
  	    {
! 	      (* disasm_info.fprintf_func) (disasm_info.stream, "\n");
  	      objdump_print_addr_with_sym (abfd, section, sym,
  					   section->vma + addr_offset,
  					   &disasm_info,
  					   FALSE);
! 	      (* disasm_info.fprintf_func) (disasm_info.stream, ":\n");
  	    }
  
  	  if (sym != NULL && bfd_asymbol_value (sym) > section->vma + addr_offset)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]