Skip to content

Commit 57e8cc6

Browse files
author
martin
committed
Document the flag needed for function names in stack backtraces.
Glibc and Apple's libc both provide support for stack introspection. This is used by the invariant code to generate a stack backtrace on invariant failure. By default GCC strips out the function names so an additional LINKFLAG is needed to get function names in the backtrace. This was hidden^Wdocumented in util/invariant.cpp, this patch adds it to config.inc so it can be more widely understood and used.
1 parent 3e7cd4a commit 57e8cc6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/config.inc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ endif
1212
#CXXFLAGS += -O2 -DNDEBUG
1313
#CXXFLAGS += -O0 -g
1414

15+
# With GCC this adds function names in stack backtraces
16+
#LINKFLAGS="-rdynamic"
17+
1518
# If GLPK is available; this is used by goto-instrument and musketeer.
1619
#LIB_GLPK = -lglpk
1720

0 commit comments

Comments
 (0)