summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/rfapi/rfapi.c24
-rw-r--r--bgpd/rfapi/rfapi_import.c33
-rw-r--r--bgpd/rfapi/rfapi_import.h2
3 files changed, 2 insertions, 57 deletions
diff --git a/bgpd/rfapi/rfapi.c b/bgpd/rfapi/rfapi.c
index ff7137bdd9..a2c86d1eae 100644
--- a/bgpd/rfapi/rfapi.c
+++ b/bgpd/rfapi/rfapi.c
@@ -46,11 +46,6 @@
#include "bgpd/rfapi/rfapi_encap_tlv.h"
#include "bgpd/rfapi/vnc_debug.h"
-#ifdef HAVE_GLIBC_BACKTRACE
-/* for backtrace and friends */
-#include <execinfo.h>
-#endif /* HAVE_GLIBC_BACKTRACE */
-
#define DEBUG_CLEANUP 0
struct ethaddr rfapi_ethaddr0 = {{0}};
@@ -2091,24 +2086,7 @@ int rfapi_close(void *handle)
vnc_zlog_debug_verbose("%s: rfd=%p", __func__, rfd);
#ifdef RFAPI_WHO_IS_CALLING_ME
-#ifdef HAVE_GLIBC_BACKTRACE
-#define RFAPI_DEBUG_BACKTRACE_NENTRIES 5
- {
- void *buf[RFAPI_DEBUG_BACKTRACE_NENTRIES];
- char **syms;
- int i;
- size_t size;
-
- size = backtrace(buf, RFAPI_DEBUG_BACKTRACE_NENTRIES);
- syms = backtrace_symbols(buf, size);
- for (i = 0; i < size && i < RFAPI_DEBUG_BACKTRACE_NENTRIES;
- ++i) {
- vnc_zlog_debug_verbose("backtrace[%2d]: %s", i,
- syms[i]);
- }
- free(syms);
- }
-#endif
+ zlog_backtrace(LOG_INFO);
#endif
bgp = rfd->bgp;
diff --git a/bgpd/rfapi/rfapi_import.c b/bgpd/rfapi/rfapi_import.c
index a93e186f8d..f9789adad2 100644
--- a/bgpd/rfapi/rfapi_import.c
+++ b/bgpd/rfapi/rfapi_import.c
@@ -44,11 +44,6 @@
#include "bgpd/rfapi/rfapi_encap_tlv.h"
#include "bgpd/rfapi/vnc_debug.h"
-#ifdef HAVE_GLIBC_BACKTRACE
-/* for backtrace and friends */
-#include <execinfo.h>
-#endif /* HAVE_GLIBC_BACKTRACE */
-
#undef DEBUG_MONITOR_MOVE_SHORTER
#undef DEBUG_RETURNED_NHL
#undef DEBUG_ROUTE_COUNTERS
@@ -79,32 +74,6 @@ struct rfapi_withdraw {
/*
* DEBUG FUNCTION
- * It's evil and fiendish. It's compiler-dependent.
- * ? Might need LDFLAGS -rdynamic to produce all function names
- */
-void rfapiDebugBacktrace(void)
-{
-#ifdef HAVE_GLIBC_BACKTRACE
-#define RFAPI_DEBUG_BACKTRACE_NENTRIES 200
- void *buf[RFAPI_DEBUG_BACKTRACE_NENTRIES];
- char **syms;
- size_t i;
- size_t size;
-
- size = backtrace(buf, RFAPI_DEBUG_BACKTRACE_NENTRIES);
- syms = backtrace_symbols(buf, size);
-
- for (i = 0; i < size && i < RFAPI_DEBUG_BACKTRACE_NENTRIES; ++i) {
- vnc_zlog_debug_verbose("backtrace[%2zu]: %s", i, syms[i]);
- }
-
- free(syms);
-#else
-#endif
-}
-
-/*
- * DEBUG FUNCTION
* Count remote routes and compare with actively-maintained values.
* Abort if they disagree.
*/
@@ -1709,7 +1678,7 @@ struct rfapi_next_hop_entry *rfapiRouteNode2NextHopList(
#ifdef DEBUG_RETURNED_NHL
vnc_zlog_debug_verbose("%s: called with node pfx=%rRN", __func__, rn);
- rfapiDebugBacktrace();
+ zlog_backtrace(LOG_INFO);
#endif
rfapiQprefix2Rprefix(p, &rprefix);
diff --git a/bgpd/rfapi/rfapi_import.h b/bgpd/rfapi/rfapi_import.h
index dd06afe7e2..1a37e1c2db 100644
--- a/bgpd/rfapi/rfapi_import.h
+++ b/bgpd/rfapi/rfapi_import.h
@@ -57,8 +57,6 @@ struct rfapi_import_table {
extern uint8_t rfapiRfpCost(struct attr *attr);
-extern void rfapiDebugBacktrace(void);
-
extern void rfapiCheckRouteCount(void);
/*