[Spice-devel] [PATCH v2] common: add backtrace via gstack or glibc backtrace

Christophe Fergeau cfergeau at redhat.com
Mon Jul 18 09:21:43 PDT 2011


On Mon, Jul 18, 2011 at 06:42:14PM +0300, Alon Levy wrote:
> diff --git a/common/spice_common.h b/common/spice_common.h
> index bc74486..6c5154c 100644
> --- a/common/spice_common.h
> +++ b/common/spice_common.h
> @@ -22,9 +22,11 @@
>  #include <stdint.h>
>  #include <time.h>
>  #include <stdlib.h>
> +#include "backtrace.h"
>  
>  #define ASSERT(x) if (!(x)) {                               \
>      printf("%s: ASSERT %s failed\n", __FUNCTION__, #x);     \
> +    spice_backtrace();                                      \
>      abort();                                                \
>  }

Given that it's the only change in existing code, and that it's only
trigger right before an abort(), no need to go over this series for days
and days imo ;) What happens on Windows though? Shouldn't we have an empty
stub for spice_backtrace() there?

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20110718/10383d75/attachment.pgp>


More information about the Spice-devel mailing list