Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-11-18 02:20:56 +0300
committerCampbell Barton <ideasman42@gmail.com>2014-11-18 02:20:56 +0300
commit94f0d18470fc454b456f711c9d040a7fef6780fb (patch)
tree77c3a62ac3f906a1517370351056e2fa4ebb598f /source/blender/blenlib/BLI_utildefines.h
parent1e5d5085675afd1c3d6e0191e668449217f733ed (diff)
BLI_assert: print a backtrace with the error
Add BLI_system_backtrace()
Diffstat (limited to 'source/blender/blenlib/BLI_utildefines.h')
-rw-r--r--source/blender/blenlib/BLI_utildefines.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h
index 16d3c2f8a42..a6dee7fd263 100644
--- a/source/blender/blenlib/BLI_utildefines.h
+++ b/source/blender/blenlib/BLI_utildefines.h
@@ -510,6 +510,7 @@
* for aborting need to define WITH_ASSERT_ABORT
*/
#ifndef NDEBUG
+extern void BLI_system_backtrace(FILE *fp);
# ifdef WITH_ASSERT_ABORT
# define _BLI_DUMMY_ABORT abort
# else
@@ -519,6 +520,7 @@
# define BLI_assert(a) \
(void)((!(a)) ? ( \
( \
+ BLI_system_backtrace(stderr), \
fprintf(stderr, \
"BLI_assert failed: %s:%d, %s(), at \'%s\'\n", \
__FILE__, __LINE__, __func__, STRINGIFY(a)), \