[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugging GL apps

Erik wrote:

> mm, pretty crude :) I like to play starcraft in wine, and occasionally it locks
> up and since it's in DGA, I can't recover. If I use the sysrq magic, I usually
> destroy my vc's (framebuffer), and have no second computer that's in immediate
> access. My solution was to write a small program (it's called ohshit.c, I can
> make it public if anyone wants). All it does is listen to the joystick, if it
> receives button 1, it executes argv[1], and if it receives button 2, it
> executes argv[2] (just enough error checking so it won't seg if you click
> button 2 with no argv[2]). I usually run it like
>     ./ohshit 'killall -9 wine' 'killall -9 X'
> but it could be bound with a program to fix the gl states and stuff :) That way
> I'm free to do whatever I want and still have buttons that do sensible things
> if I blow stuff up without being on a timer :)

If *that's* what you want, then there is a better 'official' solution.

The GPM program can do that with the mouse. Hold down one mouse button
and TRIPLE-CLICK (!) the other - then depending on what mouse buttons
you click next, it'll execute one of a number of different programs or

Check out the GPM manual for how you set all that up.

The advantage of what I was suggesting is that ALL your peripherals can
be hosed and the command will STILL execute.  Also, there is no fixed
amount of time after which the action happens - it will ONLY run if the
program you are testing locks up somehow and fails to execute it's main

Steve Baker                  http://web2.airmail.net/sjbaker1
sjbaker1@airmail.net (home)  http://www.woodsoup.org/~sbaker
sjbaker@hti.com      (work)