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 Nick,

Thanks for correcting this.

Could you tell me why objdump uses printf/fprintf this way please? I
have not seen any way to redirect output to a file etc.

fprintf_func is always fprintf and stream is always stdout from what I
have seen [it is even set again in code other than
INIT_DISASSEMBLE_INFO()].  I have not seen any args that would change
this either.  It makes the code less readable having to have (*
disasm_info.fprintf_func)
(disasm_info.stream, "\n"); if any extra functionality from having this
way is not used IMO.

Normally I make my code in keeping with the formating style of the
current src's. However, I do not find the GNU coding standards as
perfect in some respects IMO. Does someone run indent on
the binutils src's to maintain the formating?

It would be more hassle coding in my own style then converting back to
GNU style though. So I will probably just write my code in GNU style...


Regards


JG




on the 17/03/03 11:16, Nick Clifton wrote:
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.








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