diff options
author | Werner Koch <[email protected]> | 2016-06-02 13:09:42 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2016-06-02 13:57:59 +0000 |
commit | c9f9fabdcc1022a5366e1c841acde55fb07105cb (patch) | |
tree | 1cce4c381c064d9d5862fbdf282ece4a615e27f1 | |
parent | g10: Allow User ID length >= 256. (diff) | |
download | gnupg-c9f9fabdcc1022a5366e1c841acde55fb07105cb.tar.gz gnupg-c9f9fabdcc1022a5366e1c841acde55fb07105cb.zip |
common: Add comments on how to enable backtrace().
--
-rw-r--r-- | common/logging.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/common/logging.c b/common/logging.c index 9175b4f19..b6bafc79d 100644 --- a/common/logging.c +++ b/common/logging.c @@ -54,7 +54,7 @@ #include <unistd.h> #include <fcntl.h> #include <assert.h> - +/* #include <execinfo.h> */ #define GNUPG_COMMON_NEED_AFLOCAL 1 #include "util.h" @@ -748,6 +748,19 @@ do_logv (int level, int ignore_arg_ptr, const char *fmt, va_list arg_ptr) if (missing_lf) es_putc_unlocked ('\n', logstream ); es_funlockfile (logstream); + /* Using backtrace requires a configure test and to pass + * -rdynamic to gcc. Thus we do not enable it now. */ + /* { */ + /* void *btbuf[20]; */ + /* int btidx, btlen; */ + /* char **btstr; */ + + /* btlen = backtrace (btbuf, DIM (btbuf)); */ + /* btstr = backtrace_symbols (btbuf, btlen); */ + /* if (btstr) */ + /* for (btidx=0; btidx < btlen; btidx++) */ + /* log_debug ("[%d] %s\n", btidx, btstr[btidx]); */ + /* } */ abort (); } else |