[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC][PATCH v3 03/21] virtproxy: add debug functions fo
From: |
Jes Sorensen |
Subject: |
Re: [Qemu-devel] [RFC][PATCH v3 03/21] virtproxy: add debug functions for virtproxy core |
Date: |
Thu, 18 Nov 2010 12:09:10 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101103 Fedora/1.0-0.33.b2pre.fc14 Lightning/1.0b3pre Thunderbird/3.1.6 |
On 11/16/10 02:15, Michael Roth wrote:
> Signed-off-by: Michael Roth <address@hidden>
> ---
> virtproxy.c | 17 +++++++++++++++++
> 1 files changed, 17 insertions(+), 0 deletions(-)
>
> diff --git a/virtproxy.c b/virtproxy.c
> index 8f18d83..3686c77 100644
> --- a/virtproxy.c
> +++ b/virtproxy.c
> @@ -13,6 +13,23 @@
>
> #include "virtproxy.h"
>
> +#define DEBUG_VP
> +
> +#ifdef DEBUG_VP
> +#define TRACE(msg, ...) do { \
> + fprintf(stderr, "%s:%s():L%d: " msg "\n", \
> + __FILE__, __FUNCTION__, __LINE__, ## __VA_ARGS__); \
> +} while(0)
> +#else
> +#define TRACE(msg, ...) \
> + do { } while (0)
> +#endif
> +
> +#define LOG(msg, ...) do { \
> + fprintf(stderr, "%s:%s(): " msg "\n", \
> + __FILE__, __FUNCTION__, ## __VA_ARGS__); \
> +} while(0)
> +
I wonder if it wouldn't make sense to do this in a more generic way and
stick it in a header file. This type of debug code seems to show up
repeatedly all over the place.
Cheers,
Jes
- [Qemu-devel] [RFC][PATCH v3 00/21] virtproxy: host/guest communication layer, Michael Roth, 2010/11/15
- [Qemu-devel] [RFC][PATCH v3 01/21] virtproxy: base data structures and constants, Michael Roth, 2010/11/15
- Re: [Qemu-devel] [RFC][PATCH v3 01/21] virtproxy: base data structures and constants, Jes Sorensen, 2010/11/18
- Re: [Qemu-devel] [RFC][PATCH v3 01/21] virtproxy: base data structures and constants, Michael Roth, 2010/11/18
- Re: [Qemu-devel] [RFC][PATCH v3 01/21] virtproxy: base data structures and constants, Anthony Liguori, 2010/11/18
- Re: [Qemu-devel] [RFC][PATCH v3 01/21] virtproxy: base data structures and constants, Jes Sorensen, 2010/11/18
- Re: [Qemu-devel] [RFC][PATCH v3 01/21] virtproxy: base data structures and constants, Anthony Liguori, 2010/11/18
- Re: [Qemu-devel] [RFC][PATCH v3 01/21] virtproxy: base data structures and constants, Jes Sorensen, 2010/11/18
[Qemu-devel] [RFC][PATCH v3 03/21] virtproxy: add debug functions for virtproxy core, Michael Roth, 2010/11/15
- Re: [Qemu-devel] [RFC][PATCH v3 03/21] virtproxy: add debug functions for virtproxy core,
Jes Sorensen <=
[Qemu-devel] [RFC][PATCH v3 04/21] virtproxy: list look-up functions conns/oforwards/iforwards, Michael Roth, 2010/11/15
[Qemu-devel] [RFC][PATCH v3 02/21] virtproxy: qemu-vp, standalone daemon skeleton, Michael Roth, 2010/11/15
[Qemu-devel] [RFC][PATCH v3 05/21] virtproxy, add vp_channel_send_all, Michael Roth, 2010/11/15