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

The function uses glibc specific functions

Signed-off-by: Simon Zeni <simon@bl4ckb0ne.ca>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12108>
This commit is contained in:
Simon Zeni 2021-08-16 11:17:06 -04:00 committed by Marge Bot
parent 0bbb9001c2
commit 90be0d7963
1 changed files with 3 additions and 34 deletions

View File

@ -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
}