Mesa (main): util/u_debug_symbol: remove debug_symbol_name_glibc and execinfo dependency
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Aug 26 02:10:03 UTC 2021
Module: Mesa
Branch: main
Commit: 973e9e25bd8227452144578ec1cc3d3f0d23b491
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=973e9e25bd8227452144578ec1cc3d3f0d23b491
Author: Simon Zeni <simon at bl4ckb0ne.ca>
Date: Mon Aug 16 11:23:01 2021 -0400
util/u_debug_symbol: remove debug_symbol_name_glibc and execinfo dependency
Signed-off-by: Simon Zeni <simon at bl4ckb0ne.ca>
Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12108>
---
src/util/u_debug_symbol.c | 31 -------------------------------
1 file changed, 31 deletions(-)
diff --git a/src/util/u_debug_symbol.c b/src/util/u_debug_symbol.c
index 73225e9e495..677159dca40 100644
--- a/src/util/u_debug_symbol.c
+++ b/src/util/u_debug_symbol.c
@@ -218,31 +218,6 @@ debug_symbol_name_dbghelp(const void *addr, char* buf, unsigned size)
#endif /* PIPE_OS_WINDOWS */
-
-#if defined(HAVE_EXECINFO_H)
-
-#include <execinfo.h>
-
-/* This can only provide dynamic symbols, or binary offsets into a file.
- *
- * To fix this, post-process the output with tools/addr2line.sh
- */
-static inline boolean
-debug_symbol_name_glibc(const void *addr, char* buf, unsigned size)
-{
- char** syms = backtrace_symbols((void**)&addr, 1);
- if (!syms) {
- return FALSE;
- }
- strncpy(buf, syms[0], size - 1);
- buf[size - 1] = 0;
- free(syms);
- return TRUE;
-}
-
-#endif /* defined(HAVE_EXECINFO_H) */
-
-
void
debug_symbol_name(const void *addr, char* buf, unsigned size)
{
@@ -252,12 +227,6 @@ debug_symbol_name(const void *addr, char* buf, unsigned size)
}
#endif
-#if defined(HAVE_EXECINFO_H)
- if (debug_symbol_name_glibc(addr, buf, size)) {
- return;
- }
-#endif /* defined(HAVE_EXECINFO_H) */
-
snprintf(buf, size, "%p", addr);
buf[size - 1] = 0;
}
More information about the mesa-commit
mailing list