Mesa (main): glapi/gl_gentable.py: drop call to backtrace on no op

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Aug 26 02:10:03 UTC 2021


Module: Mesa
Branch: main
Commit: 90be0d7963c16c62e5d941e9972e85d990a0e6bb
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=90be0d7963c16c62e5d941e9972e85d990a0e6bb

Author: Simon Zeni <simon at bl4ckb0ne.ca>
Date:   Mon Aug 16 11:17:06 2021 -0400

glapi/gl_gentable.py: drop call to backtrace on no op

The function uses glibc specific functions

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/mapi/glapi/gen/gl_gentable.py | 37 +++----------------------------------
 1 file changed, 3 insertions(+), 34 deletions(-)

diff --git a/src/mapi/glapi/gen/gl_gentable.py b/src/mapi/glapi/gen/gl_gentable.py
index 4695614e5c6..c0e60446575 100644
--- a/src/mapi/glapi/gen/gl_gentable.py
+++ b/src/mapi/glapi/gen/gl_gentable.py
@@ -42,15 +42,6 @@ header = """/* GLXEXT is the define used in the xserver when the GLX extension i
 #include <dix-config.h>
 #endif
 
-#if (defined(GLXEXT) && defined(HAVE_BACKTRACE)) \\
-	|| (!defined(GLXEXT) && defined(DEBUG) && defined(HAVE_EXECINFO_H))
-#define USE_BACKTRACE
-#endif
-
-#ifdef USE_BACKTRACE
-#include <execinfo.h>
-#endif
-
 #ifndef _WIN32
 #include <dlfcn.h>
 #endif
@@ -69,32 +60,10 @@ header = """/* GLXEXT is the define used in the xserver when the GLX extension i
 
 static void
 __glapi_gentable_NoOp(void) {
-    const char *fstr = "Unknown";
-
-    /* Silence potential GCC warning for some #ifdef paths.
-     */
-    (void) fstr;
-#if defined(USE_BACKTRACE)
-#if !defined(GLXEXT)
-    if (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG"))
-#endif
-    {
-        void *frames[2];
-
-        if(backtrace(frames, 2) == 2) {
-            Dl_info info;
-            dladdr(frames[1], &info);
-            if(info.dli_sname)
-                fstr = info.dli_sname;
-        }
-
-#if !defined(GLXEXT)
-        fprintf(stderr, "Call to unimplemented API: %s\\n", fstr);
-#endif
-    }
-#endif
 #if defined(GLXEXT)
-    LogMessage(X_ERROR, "GLX: Call to unimplemented API: %s\\n", fstr);
+    LogMessage(X_ERROR, "GLX: Call to unimplemented API: Unknown\\n");
+#else
+    fprintf(stderr, "Call to unimplemented API: Unknown\\n");
 #endif
 }
 



More information about the mesa-commit mailing list