On Fri, Sep 21, 2018 at 08:10:08PM +0200, Christophe Fergeau wrote:
> 
> All your SPICE_DEBUG calls include a __FUNCTION__, but it seems
> SPICE_DEBUG already does that for you?
> 
> #define SPICE_DEBUG(fmt, ...)                                   \
>     do {                                                        \
>         if (G_UNLIKELY(spice_util_get_debug()))                 \
>             g_debug(G_STRLOC " " fmt, ## __VA_ARGS__);          \
>     } while (0)
> 
> with
> 
> #define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) ":" __PRETTY_FUNCTION__ 
> "()"

I c&p'ed this from devhelp, but this is actually wrong, G_STRLOC is:

/* Provide a string identifying the current code position */
#if defined(__GNUC__) && (__GNUC__ < 3) && !defined(__cplusplus)
#define G_STRLOC    __FILE__ ":" G_STRINGIFY (__LINE__) ":" __PRETTY_FUNCTION__ 
"()"
#else
#define G_STRLOC    __FILE__ ":" G_STRINGIFY (__LINE__)
#endif

so no __PRETTY_FUNCTION__ on current GCC because of 
https://bugzilla.gnome.org/show_bug.cgi?id=69097

Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to