1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-05-30 22:08:02 +02:00

common: Add comments on how to enable backtrace().

--
This commit is contained in:
Werner Koch 2016-06-02 15:09:42 +02:00
parent db1ecc8212
commit c9f9fabdcc
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -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