Am Donnerstag, 28. August 2014 um 11:31:06, schrieb Richard Heck <rgh...@lyx.org> > On 08/28/2014 03:19 AM, Peter Kümmel wrote: > > On 28.08.2014 00:20, Richard Heck wrote: > >> On 08/27/2014 01:52 PM, Peter Kümmel wrote: > >>> commit ada262a78b2ec12e9697783b27523b8c13b51066 > >>> Author: Peter Kümmel <kuem...@lyx.org> > >>> Date: Wed Aug 27 19:40:40 2014 +0200 > >>> > >>> print callstack on assert > >>> > >>> diff --git a/src/support/lassert.cpp b/src/support/lassert.cpp > >>> index 281330e..fa2ffb0 100644 > >>> --- a/src/support/lassert.cpp > >>> +++ b/src/support/lassert.cpp > >>> @@ -10,6 +10,7 @@ > >>> */ > >>> #include <config.h> > >>> +#include <lassert.h> > >>> #include "support/convert.h" > >>> #include "support/debug.h" > >>> @@ -35,13 +36,21 @@ namespace lyx { > >>> using namespace std; > >>> using namespace support; > >>> -// TODO Should we try to print the call stack in the course of these? > >>> + > >>> +void doAssertWithCallstack(bool value) > >>> +{ > >>> + if (!value) { > >>> + printCallStack(); > >>> + BOOST_ASSERT(false); > >>> + } > >>> +} > >>> + > >> > >> What about: > >> > >> printCallStack(); > >> BOOST_ASSERT(value); > >> > >> It seems worth printing the call stack whether we are going to abort > >> or not. > >> > >> Richard > >> > >> > > > > Doesn't this produce too much noise for all the "true" cases? (it is > > declared in assert.h ATM) > > Oh, I see. Never mind then. > > > Is it still a cmake-build only feature? > > No idea. > > rh
There are no traces of LYX_CALLSTACK_PRINTING in automake files. Kornel
signature.asc
Description: This is a digitally signed message part.