Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!gem.mps.ohio-state.edu!apple!sun-barr!newstop!sun!turnpike!argv From: argv%turnpike@Sun.COM (Dan Heller) Newsgroups: comp.windows.x Subject: Debugging while server grabs are present. Message-ID: <126096@sun.Eng.Sun.COM> Date: 10 Oct 89 19:49:25 GMT Sender: news@sun.Eng.Sun.COM Reply-To: argv@sun.Eng (Dan Heller) Lines: 34 You're debugging your program and it's segfaulting somewhere in a routine in which there is a pointer grab. It dumps core, so you enter your debugger (dbx for me) and you can't read the stack trace because it's a stack overflow and it can't read the core file correctly. so, you want to run the program from within dbx to identify where the problem lies and to see the values of glabols. ooops... dbx stopped, but the pointer grab is still going. You're hung. Because the pointer is grabbed, moving the pointer doesn't reset the input focus for keyboard input. In my case, my machine isn't connected to any other machine so I can't login from somewhere else to free the grab (kill the process). I have to reboot my machine. I have several questions as a result of this. Altho I can't get access to any other debugger, are there any other debuggers which can execute certain commands upon the recepit of an interrupt which would stop execution of the code being debugged? For example, I'd like to set it so that if it receives an error in execution of the code, I'd like it to call a function which releases the grab -- or that resets my tty settings... I can supply the routines to do it -- I just want the ability to get the debugger to automatically call those routines. And this idea is more X-specific altho I realizes the chances of the idea being implemented. I'd like to specify a timeout value for the -server- so that if the server grab hasn't been released by the timeout, the server releases the grab automatically. This can't be a client-side function because the client may not be running. Of course, this would imply a change/addition to the X protocol, which as I understand it, will not be modified ever. Does anyone have a workaround for this problem? dan ----- My postings reflect my opinion only -- not the opinion of any company.