36 lines
871 B
Diff
36 lines
871 B
Diff
From afe64bae6d398fc9a194bce2763d6b2ab080f38f Mon Sep 17 00:00:00 2001
|
|
From: Chandrakant Sharpa <s.chandrakant@globaledgesoft.com>
|
|
Date: Mon, 14 Jun 2021 17:53:16 +0530
|
|
Subject: [PATCH] Handling backtrace and execinfo header file
|
|
|
|
Signed-off-by: Chandrakant Sharpa <s.chandrakant@globaledgesoft.com>
|
|
---
|
|
lib/eal/linux/eal_debug.c | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
--- a/lib/eal/linux/eal_debug.c
|
|
+++ b/lib/eal/linux/eal_debug.c
|
|
@@ -2,9 +2,11 @@
|
|
* Copyright(c) 2010-2014 Intel Corporation
|
|
*/
|
|
|
|
+#ifdef __GLIBC__
|
|
#ifdef RTE_BACKTRACE
|
|
#include <execinfo.h>
|
|
#endif
|
|
+#endif
|
|
#include <stdarg.h>
|
|
#include <signal.h>
|
|
#include <stdlib.h>
|
|
@@ -26,8 +28,10 @@ void rte_dump_stack(void)
|
|
char **symb = NULL;
|
|
int size;
|
|
|
|
+#ifdef __GLIBC__
|
|
size = backtrace(func, BACKTRACE_SIZE);
|
|
symb = backtrace_symbols(func, size);
|
|
+#endif
|
|
|
|
if (symb == NULL)
|
|
return;
|