[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 00/15] Debug output revamp
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 00/15] Debug output revamp |
Date: |
Mon, 25 Feb 2013 15:06:25 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) |
Alexander Graf <address@hidden> 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 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) { log(...) } } while (0)
>>>
>>> sort of solution. Immediate constant into the IF, which even an -O0
>>> compile will delete as dead.
>>
>> I remember there being complaints about me changing in-code #ifdefs to
>> #ifs in v1 as a consequence... some naming convention like #ifdef DEBUG
>> #define DEBUG_ON 1 #else #define DEBUG_ON 0 or so would address that.
>> Let's wait for some more feedback.
>
> Yeah, that certainly works for me.
Neither #if vs. #ifdef nor the additional macro to avoid it bother me,
so if it makes you happier, fine with me.
- Re: [Qemu-ppc] [PATCH v2 00/15] Debug output revamp, (continued)
- Re: [Qemu-ppc] [PATCH v2 00/15] Debug output revamp, Richard Henderson, 2013/02/21
- Re: [Qemu-ppc] [PATCH v2 00/15] Debug output revamp, Paolo Bonzini, 2013/02/21
- Re: [Qemu-ppc] [PATCH v2 00/15] Debug output revamp, Andreas Färber, 2013/02/21
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 00/15] Debug output revamp, Markus Armbruster, 2013/02/22
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 00/15] Debug output revamp, Andreas Färber, 2013/02/22
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 00/15] Debug output revamp, Richard Henderson, 2013/02/22
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 00/15] Debug output revamp, Markus Armbruster, 2013/02/22
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 00/15] Debug output revamp, Andreas Färber, 2013/02/22
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 00/15] Debug output revamp, Peter Crosthwaite, 2013/02/23
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 00/15] Debug output revamp, Alexander Graf, 2013/02/25
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 00/15] Debug output revamp,
Markus Armbruster <=