diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h index 753fa58e8..cd6da59f0 100644 --- a/hw/xfree86/common/xf86.h +++ b/hw/xfree86/common/xf86.h @@ -205,6 +205,7 @@ void xf86InterceptSignals(int *signo); void xf86InterceptSigIll(void (*sigillhandler)(void)); Bool xf86EnableVTSwitch(Bool new); void xf86ProcessActionEvent(ActionEvent action, void *arg); +void xf86PrintBacktrace(void); /* xf86Helper.c */ diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index 48af2ebc8..ff75a7d3d 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -632,6 +632,16 @@ xf86SigHandler(int signo) FatalError("Caught signal %d. Server aborting\n", signo); } +/* + * xf86PrintBacktrace -- + * Print a stack backtrace for debugging purposes. + */ +_X_EXPORT void +xf86PrintBacktrace(void) +{ + xorg_backtrace(); +} + #define KeyPressed(k) (keyc->postdown[k >> 3] & (1 << (k & 7))) #define ModifierDown(k) ((keyc->state & (k)) == (k))