Re: [Qemu-devel] [PATCH v2 00/15] Debug output revamp

2013-02-25 Thread Markus Armbruster
Alexander Graf writes: > On 22.02.2013, at 18:41, Andreas Färber wrote: > >> Am 22.02.2013 17:54, schrieb Richard Henderson: >>> On 02/22/2013 08:16 AM, Andreas Färber wrote: I would be willing to do a macro-based v3 using do { ... } while (0) if maintainers can reach agreement on that

Re: [Qemu-devel] [PATCH v2 00/15] Debug output revamp

2013-02-25 Thread Alexander Graf
On 22.02.2013, at 18:41, Andreas Färber wrote: > Am 22.02.2013 17:54, schrieb Richard Henderson: >> On 02/22/2013 08:16 AM, Andreas Färber wrote: >>> I would be willing to do a macro-based v3 using do { ... } while (0) if >>> maintainers can reach agreement on that and on how to do the if (0). >>

Re: [Qemu-devel] [PATCH v2 00/15] Debug output revamp

2013-02-23 Thread Peter Crosthwaite
Hi All, On Sat, Feb 23, 2013 at 3:41 AM, Andreas Färber wrote: > Am 22.02.2013 17:54, schrieb Richard Henderson: >> On 02/22/2013 08:16 AM, Andreas Färber wrote: >>> I would be willing to do a macro-based v3 using do { ... } while (0) if >>> maintainers can reach agreement on that and on how to d

Re: [Qemu-devel] [PATCH v2 00/15] Debug output revamp

2013-02-22 Thread Andreas Färber
Am 22.02.2013 17:54, schrieb Richard Henderson: > On 02/22/2013 08:16 AM, Andreas Färber wrote: >> I would be willing to do a macro-based v3 using do { ... } while (0) if >> maintainers can reach agreement on that and on how to do the if (0). > > FWIW, I'm in favor of the > > #ifndef DEBUG > # de

Re: [Qemu-devel] [PATCH v2 00/15] Debug output revamp

2013-02-22 Thread Markus Armbruster
Richard Henderson writes: > On 02/22/2013 08:16 AM, Andreas Färber wrote: >> I would be willing to do a macro-based v3 using do { ... } while (0) if >> maintainers can reach agreement on that and on how to do the if (0). > > FWIW, I'm in favor of the > > #ifndef DEBUG > # define DEBUG 0 > #endif

Re: [Qemu-devel] [PATCH v2 00/15] Debug output revamp

2013-02-22 Thread Richard Henderson
On 02/22/2013 08:16 AM, Andreas Färber wrote: > I would be willing to do a macro-based v3 using do { ... } while (0) if > maintainers can reach agreement on that and on how to do the if (0). FWIW, I'm in favor of the #ifndef DEBUG # define DEBUG 0 #endif #define MACRO_NAME(...) \ do { if (DEBUG

Re: [Qemu-devel] [PATCH v2 00/15] Debug output revamp

2013-02-22 Thread Markus Armbruster
Andreas Färber writes: > Am 21.02.2013 17:10, schrieb Richard Henderson: >> On 2013-02-20 20:24, Andreas Färber wrote: >>> v2 replaces macros with static functions, adopting Scott's scheme of >>> const >>> variables set through #ifdefs (keeping their defined() semantics) and >>> adopting >>> Anth

Re: [Qemu-devel] [PATCH v2 00/15] Debug output revamp

2013-02-22 Thread Andreas Färber
Am 22.02.2013 17:00, schrieb Markus Armbruster: > Andreas Färber writes: > >> Am 21.02.2013 17:10, schrieb Richard Henderson: >>> On 2013-02-20 20:24, Andreas Färber wrote: v2 replaces macros with static functions, adopting Scott's scheme of const variables set through #ifdefs (kee

Re: [Qemu-devel] [PATCH v2 00/15] Debug output revamp

2013-02-21 Thread Andreas Färber
Am 21.02.2013 17:10, schrieb Richard Henderson: > On 2013-02-20 20:24, Andreas Färber wrote: >> v2 replaces macros with static functions, adopting Scott's scheme of >> const >> variables set through #ifdefs (keeping their defined() semantics) and >> adopting >> Anthony's proposal of using va_list f

Re: [Qemu-devel] [PATCH v2 00/15] Debug output revamp

2013-02-21 Thread Paolo Bonzini
Il 21/02/2013 17:10, Richard Henderson ha scritto: >> v2 replaces macros with static functions, adopting Scott's scheme of >> const >> variables set through #ifdefs (keeping their defined() semantics) and >> adopting >> Anthony's proposal of using va_list for argument passing. >> v1 had changed som

Re: [Qemu-devel] [PATCH v2 00/15] Debug output revamp

2013-02-21 Thread Richard Henderson
On 2013-02-20 20:24, Andreas Färber wrote: v2 replaces macros with static functions, adopting Scott's scheme of const variables set through #ifdefs (keeping their defined() semantics) and adopting Anthony's proposal of using va_list for argument passing. v1 had changed some #ifdefs into ifs due t

[Qemu-devel] [PATCH v2 00/15] Debug output revamp

2013-02-20 Thread Andreas Färber
Hello, Based on suggestions from Igor Mitsyanko, Anthony and Alex this series aims to expose debug output to compile-testing, so that it doesn't constantly break. The basic requirement is to move format strings and arguments out of #ifdef sections or no-op macros, so that the C compiler sees and c