[PATCH 2/3 v5] src/readelf.c: Add support for print_debug_* output buffering
Mark Wielaard
mark@klomp.org
Tue Aug 5 22:22:38 GMT 2025
Hi Aaron,
On Mon, Aug 04, 2025 at 11:20:53PM -0400, Aaron Merey wrote:
> Safely handle stdout output during concurrent calls to print_debug_*
> functions.
>
> For any print_debug_* function and any function that could be called
> from print_debug_* which also prints to stdout: add a FILE * argument
> and replace all printf, puts, putchar with fprintf. All printing
> to stdout will now be written to this FILE instead.
>
> The FILE * is an interface to a per-thread dynamically-sized buffer.
> libthread.a manages the allocation, printing and deallocation of
> these buffers.
>
> Signed-off-by: Aaron Merey <amerey@redhat.com>
> ---
> v5: no changes.
Still looks good.
Thanks,
Mark
More information about the Elfutils-devel
mailing list