Skip to content
Permalink
Browse files
8245938: Remove unused print_stack(void) method from XToolkit.c
Reviewed-by: serb
  • Loading branch information
Alexander Scherbatiy committed Jun 8, 2020
1 parent 2048bcb commit 2845c3d02979cf51308fff7ce1198d2882bbb6ff
Showing 1 changed file with 0 additions and 23 deletions.
@@ -27,9 +27,6 @@
#include <X11/Xutil.h>
#include <X11/Xos.h>
#include <X11/Xatom.h>
#ifdef __linux__
#include <execinfo.h>
#endif

#include <jvm.h>
#include <jni.h>
@@ -773,26 +770,6 @@ JNIEXPORT jstring JNICALL Java_sun_awt_X11_XToolkit_getEnv
return ret;
}

#ifdef __linux__
void print_stack(void)
{
void *array[10];
size_t size;
char **strings;
size_t i;

size = backtrace (array, 10);
strings = backtrace_symbols (array, size);

fprintf (stderr, "Obtained %zd stack frames.\n", size);

for (i = 0; i < size; i++)
fprintf (stderr, "%s\n", strings[i]);

free (strings);
}
#endif

Window get_xawt_root_shell(JNIEnv *env) {
static jclass classXRootWindow = NULL;
static jmethodID methodGetXRootWindow = NULL;

0 comments on commit 2845c3d

Please sign in to comment.