diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2007-06-01 00:19:53 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2007-06-01 00:19:53 +0000 |
commit | 20ee436bed716a61fb71214bd629ff047d44f37b (patch) | |
tree | d5c313bc0bdd245116d065d12c86d21e0b40e6f0 /README | |
parent | aaa3f6e6483aff6e440f7bb38755058203efb9c3 (diff) |
Add information on debugging, mostly copied from XF4/README.
Diffstat (limited to 'README')
-rw-r--r-- | README | 45 |
1 files changed, 44 insertions, 1 deletions
@@ -162,5 +162,48 @@ for more desperate cases, remove all files from XSRCDIR not in CVS: cd XSRCDIR cvs -q update -PAd -I - | awk '$1=="?" {print $2}' | xargs rm -f +o How to build something with debug information? + ---------------------------------------------- + +You can use "env CFLAGS=-g make -f Makefile.bsd-wrapper build" to +build any module with debugging information, but you'll need to remove +XOBJDIR/xorg-config.cache.${MACHINE} before doing that because +autoconf caches the value of CFLAGS in its cache. + +o How to get a core file out of the X server? + ------------------------------------------- + +Several things are needed: + +1) set kern.nosuidcoredump=2 in /etc/sysctl.conf +2) put + + Option "NoTrapSignals" "true" + + in the "ServerFlags" section of /etc/X11/xorg.conf. If such a section + doesn't exist, it can be added as follow: + + Section "ServerFlags" + Option "NoTrapSignals" "true" + EndSection + + anywhere in the configuration file. + +3) start the X server as root, with the -keepPriv option. A regular + user is not allowed to use this option. If you use xdm, you can add + the option in /etc/X11/xdm/Xservers. If you want to use startx, you + need to run it as root, like this: + + startx -- /usr/X11R6/bin/X -keepPriv + +Now the X server will dump core when catching a fatal signal. But it +will also not be able to restore the text mode on exit. So be prepared +to log in remotely (serial terminal or ssh) to reboot your machine or +to restart X. + +The core dump will be in /var/crash. + +See also <http://xorg.freedesktop.org/wiki/Development/Documentation/ServerDebugging> + -- -$OpenBSD: README,v 1.18 2007/04/23 08:52:58 ajacoutot Exp $ +$OpenBSD: README,v 1.19 2007/06/01 00:19:52 matthieu Exp $ |