This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: objdump.c calls which do not use internal text streams
Hi JG,
> 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.
It is used in objdump.c:disassemble_bytes() to encapsulate the
printing function when calling the external 'disassemble_fn' code.
The actual need for this is probably historical, although it does make
for a reasonably clean interface. ie the disassembly code does not
have to worry about file redirection, it can just use the fprintf_func
in the info structure. If file redirection is ever needed then it can
be handled by the code in objdump itself.
> 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?
No - the style is maintained on an ad hoc basis.
Cheers
Nick