diff options
author | Jeremy Huddleston Sequoia <jeremyhu@apple.com> | 2022-12-14 17:07:46 -0800 |
---|---|---|
committer | Jeremy Huddleston Sequoia <jeremyhu@apple.com> | 2022-12-21 01:21:52 -0800 |
commit | d1a9a50792110683ae3f993eeeffeee79cf9cbce (patch) | |
tree | c78c1f2f3e5c39d6d02ad1cd461ba448195d18b4 | |
parent | 9a66690eaf67c19b90e07f39b16436d34b59e27a (diff) | |
download | xserver-d1a9a50792110683ae3f993eeeffeee79cf9cbce.tar.gz |
xquartz: Use xorg_backtrace() instead of rolling our own for debugging
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-rw-r--r-- | hw/xquartz/xpr/xprFrame.c | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/hw/xquartz/xpr/xprFrame.c b/hw/xquartz/xpr/xprFrame.c index ba84548b5..57d16d42f 100644 --- a/hw/xquartz/xpr/xprFrame.c +++ b/hw/xquartz/xpr/xprFrame.c @@ -45,10 +45,6 @@ #include <dispatch/dispatch.h> -#ifdef DEBUG_XP_LOCK_WINDOW -#include <execinfo.h> -#endif - #define DEFINE_ATOM_HELPER(func, atom_name) \ static Atom func(void) { \ static int generation; \ @@ -353,15 +349,8 @@ xprStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow) xp_error err; #ifdef DEBUG_XP_LOCK_WINDOW - void* callstack[128]; - int i, frames = backtrace(callstack, 128); - char** strs = backtrace_symbols(callstack, frames); - ErrorF("=== LOCK %d ===\n", (int)x_cvt_vptr_to_uint(wid)); - for (i = 0; i < frames; ++i) { - ErrorF(" %s\n", strs[i]); - } - free(strs); + xorg_backtrace(); #endif err = xp_lock_window(x_cvt_vptr_to_uint( @@ -371,6 +360,10 @@ xprStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow) (int)x_cvt_vptr_to_uint( wid), (int)err); +#ifdef DEBUG_XP_LOCK_WINDOW + ErrorF(" bits: %p\n", *data); +#endif + *pixelData = data[0]; *bytesPerRow = rowbytes[0]; } @@ -384,15 +377,8 @@ xprStopDrawing(RootlessFrameID wid, Bool flush) xp_error err; #ifdef DEBUG_XP_LOCK_WINDOW - void* callstack[128]; - int i, frames = backtrace(callstack, 128); - char** strs = backtrace_symbols(callstack, frames); - ErrorF("=== UNLOCK %d ===\n", (int)x_cvt_vptr_to_uint(wid)); - for (i = 0; i < frames; ++i) { - ErrorF(" %s\n", strs[i]); - } - free(strs); + xorg_backtrace(); #endif err = xp_unlock_window(x_cvt_vptr_to_uint(wid), flush); |