config: make backtrace optional
When building DPDK with musl, there is need not to disable backtrace to remove some references to execinfo.h which is not supported by musl now. This also applies to some other libc implementation which doesn't support backtrace() and backtrace_symbols(). musl is an implementation of the userspace portion of the standard library functionality described in the ISO C and POSIX standards, plus common extensions. Got more details about musl from http://www.musl-libc.org . Signed-off-by: Wei Dai <wei.dai@intel.com> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
This commit is contained in:
parent
232dc830f2
commit
4d8b986bfe
@ -96,6 +96,7 @@ CONFIG_RTE_MAX_TAILQ=32
|
||||
CONFIG_RTE_LOG_LEVEL=RTE_LOG_INFO
|
||||
CONFIG_RTE_LOG_DP_LEVEL=RTE_LOG_INFO
|
||||
CONFIG_RTE_LOG_HISTORY=256
|
||||
CONFIG_RTE_BACKTRACE=y
|
||||
CONFIG_RTE_LIBEAL_USE_HPET=n
|
||||
CONFIG_RTE_EAL_ALLOW_INV_SOCKET_ID=n
|
||||
CONFIG_RTE_EAL_ALWAYS_PANIC_ON_ERROR=n
|
||||
|
@ -31,7 +31,9 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifdef RTE_BACKTRACE
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
@ -47,6 +49,7 @@
|
||||
/* dump the stack of the calling core */
|
||||
void rte_dump_stack(void)
|
||||
{
|
||||
#ifdef RTE_BACKTRACE
|
||||
void *func[BACKTRACE_SIZE];
|
||||
char **symb = NULL;
|
||||
int size;
|
||||
@ -64,6 +67,7 @@ void rte_dump_stack(void)
|
||||
}
|
||||
|
||||
free(symb);
|
||||
#endif /* RTE_BACKTRACE */
|
||||
}
|
||||
|
||||
/* not implemented in this environment */
|
||||
|
@ -31,7 +31,9 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifdef RTE_BACKTRACE
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
@ -47,6 +49,7 @@
|
||||
/* dump the stack of the calling core */
|
||||
void rte_dump_stack(void)
|
||||
{
|
||||
#ifdef RTE_BACKTRACE
|
||||
void *func[BACKTRACE_SIZE];
|
||||
char **symb = NULL;
|
||||
int size;
|
||||
@ -64,6 +67,7 @@ void rte_dump_stack(void)
|
||||
}
|
||||
|
||||
free(symb);
|
||||
#endif /* RTE_BACKTRACE */
|
||||
}
|
||||
|
||||
/* not implemented in this environment */
|
||||
|
Loading…
x
Reference in New Issue
Block a user