summaryrefslogtreecommitdiffstats
path: root/libunwind
diff options
context:
space:
mode:
Diffstat (limited to 'libunwind')
-rw-r--r--libunwind/src/DwarfParser.hpp9
-rw-r--r--libunwind/src/config.h9
2 files changed, 10 insertions, 8 deletions
diff --git a/libunwind/src/DwarfParser.hpp b/libunwind/src/DwarfParser.hpp
index f4e5d487f4c..610a3aeb0ef 100644
--- a/libunwind/src/DwarfParser.hpp
+++ b/libunwind/src/DwarfParser.hpp
@@ -22,14 +22,7 @@
#include "dwarf2.h"
#include "AddressSpace.hpp"
-
-extern "C" bool logDWARF();
-
-#define _LIBUNWIND_TRACE_DWARF(...) \
- do { \
- if (logDWARF()) \
- fprintf(stderr, __VA_ARGS__); \
- } while (0)
+#include "config.h"
namespace libunwind {
diff --git a/libunwind/src/config.h b/libunwind/src/config.h
index fefb44e0a23..55c32825fe4 100644
--- a/libunwind/src/config.h
+++ b/libunwind/src/config.h
@@ -110,13 +110,16 @@
#define _LIBUNWIND_DEBUG_LOG(msg, ...)
#define _LIBUNWIND_TRACE_API(msg, ...)
#define _LIBUNWIND_TRACING_UNWINDING (0)
+ #define _LIBUNWIND_TRACING_DWARF (0)
#define _LIBUNWIND_TRACE_UNWINDING(msg, ...)
+ #define _LIBUNWIND_TRACE_DWARF(...)
#else
#ifdef __cplusplus
extern "C" {
#endif
extern bool logAPIs();
extern bool logUnwinding();
+ extern bool logDWARF();
#ifdef __cplusplus
}
#endif
@@ -127,11 +130,17 @@
_LIBUNWIND_LOG(msg, __VA_ARGS__); \
} while (0)
#define _LIBUNWIND_TRACING_UNWINDING logUnwinding()
+ #define _LIBUNWIND_TRACING_DWARF logDWARF()
#define _LIBUNWIND_TRACE_UNWINDING(msg, ...) \
do { \
if (logUnwinding()) \
_LIBUNWIND_LOG(msg, __VA_ARGS__); \
} while (0)
+ #define _LIBUNWIND_TRACE_DWARF(...) \
+ do { \
+ if (logDWARF()) \
+ fprintf(stderr, __VA_ARGS__); \
+ } while (0)
#endif
#ifdef __cplusplus
OpenPOWER on IntegriCloud