lightning
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disassembler output stream


From: Paul Cercueil
Subject: Re: Disassembler output stream
Date: Tue, 18 May 2021 09:14:46 +0100

Hi Marc,

I use log levels, Debug - Info - Warning - Error, the first two going to stdout, the last two going to stderr. That way I can easily separate important messages from non-important messages when debugging. If Lightning sends the disassembly to stderr, then both outputs become extremely verbose and I'd have a hard time to spot actual errors.

-Paul


Le mar., mai 18 2021 at 08:31:38 +0200, Marc Nieper-Wißkirchen <marc.nieper+gnu@gmail.com> a écrit :
Hi Paul,

I hope you can easily fix it.

POSIX and the GNU C Library define "stderr" to be "used for error messages and diagnostics issued by the program", so the disassembly info should really go there by default.

Marc

Am Mo., 17. Mai 2021 um 20:35 Uhr schrieb Paul Cercueil <paul@crapouillou.net>:
Hi,

 This now breaks it for me :)

My dynarec right now outputs all debug data (including disassembly) to
 stdout, and I run scripts on the output to check compliance vs. the
 interpreter.

 -Paul


 Le lun., mai 17 2021 at 19:02:30 +0200, Marc Nieper-Wißkirchen
 <marc.nieper+gnu@gmail.com> a écrit :
 > Thanks a lot for the quick reply and the update!
 >
 > Marc
 >
 > Am Mo., 17. Mai 2021 um 18:35 Uhr schrieb Paulo César Pereira de
 > Andrade <paulo.cesar.pereira.de.andrade@gmail.com>:
 >> Em seg., 17 de mai. de 2021 às 06:10, Marc Nieper-Wißkirchen
 >>  <marc.nieper+gnu@gmail.com> escreveu:
 >>  >
 >>  > Hi Paulo,
 >>
 >>    Hi Marc,
 >>
 >>  > this is a feature request to either make stderr (instead of
>> stdout) the disassembler output stream or to make it customizable.
 >>  >
 >>  > Currently, we have
 >>  >
 >>  > #define disasm_stream  stdout
 >>  >
 >>  > in jit_disasm.c.
 >>
>> Just created a static variable. An interface to change it might
 >> be added,
>> as builds with --enable-devel-disassembler are very useful and far
 >> easier
 >>  to debug.
 >>
>> > Especially for debugging programs that work as a pipe from stdin
 >> to stdout, it is important not to have the output cluttered with
 >> disassembly info.
 >>  >
 >>  > Thanks,
 >>  >
 >>  > Marc
 >>
 >>  Thanks,
 >>  Paulo







reply via email to

[Prev in Thread] Current Thread [Next in Thread]