[Xcb] print backtraces in case an assert fails inside xlib/xcb

Christoph Pfister christophpfister at gmail.com
Thu Jun 7 10:58:48 PDT 2007


Here you are ...

Christoph


2007/6/7, Christoph Pfister <christophpfister at gmail.com>:
> Am Mittwoch, 6. Juni 2007 22:56 schrieb Barton C Massey:
> > Thanks hugely---this is awesome, and really needed doing.
> > The thing it will help with that I'm most excited about is
> > deciding whether the bug is in the app itself or in some
> > stale or broken X library being called by the app.
>
> :)
>
> > If Josh doesn't apply this in the next couple of days, bug
> > me and I will (unless someone has a cogent objection).
> > Also, let us know if you want commit privs.
>
> I don't like git very much so I prefer sending patches ...
>
> > BTW, might want to add a line or two to indicate when the
> > backtrace has been truncated to 20 lines...
> >
> >       Bart
>
> Am Donnerstag, 7. Juni 2007 00:56 schrieb Jamey Sharp:
> > I'm not Josh but I've reviewed and pushed your patch. It looked perfect
> > to me; thanks very much! We should get a release out soon with this.
>
> You're welcome.
>
> > On Wed, Jun 06, 2007 at 01:56:24PM -0700, Barton C Massey wrote:
> > > BTW, might want to add a line or two to indicate when the
> > > backtrace has been truncated to 20 lines...
> >
> > I agree with Bart; a further patch for this would be welcome. I don't
> > think it's very important though.
>
> Okay - will do so.
>
> > --Jamey
>
> Christoph
-------------- next part --------------
diff -dNpru a/src/xcb_xlib.c b/src/xcb_xlib.c
--- a/src/xcb_xlib.c	2007-06-07 19:38:33.000000000 +0200
+++ b/src/xcb_xlib.c	2007-06-07 19:48:48.000000000 +0200
@@ -50,6 +50,9 @@ static void xcb_xlib_printbt(void)
 	for (i = 0; i < size; ++i)
 		printf("#%i %s\n", i, strings[i]);
 
+	if (size == 20)
+		printf("Note that any further strack frames are truncated.\n");
+
 	free(strings);
 #endif
 }


More information about the Xcb mailing list