A GDB breakpoint can totally freeze an X11 display when debugging
a GUI application, if the app makes a "server grab."

For example, if the application has a pull-down menu and I put
a breakpoint in the menu's callback, then the following happens:

- the menu is opened and an X11 server grab happens (in order to
  catch all mouse events even if they are outside the menu's window);

- the callback is called and GDB stops on it due to the breakpoint;

- GDB expects commands from the user, but the user cannot type
  anything anywhere in the display because of the server grab;
  of course, the menu cannot be closed because the app is stopped.

One way to get out of this is to login through the network and
kill GDB.  Usually, I access the machine through a VNC remote
display.  In addition, I telnet into the machine and run GDB in it,
sending the display to the VNC/X11 server.  When the breakpoint is
reached, I can still control GDB through the telnet session.

Is there a better way?  I would imagine that GDB could automatically
try to end an X11 server grab every time it displays its prompt.

-- 
Pierre Sarrazin <[EMAIL PROTECTED]>
_______________________________________________
Bug-gdb mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-gdb

Reply via email to