bug-gdb
[Top][All Lists]
Advanced

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

Re: [Bug-gdb] GDB and X11 server grabs


From: Pierre Sarrazin
Subject: Re: [Bug-gdb] GDB and X11 server grabs
Date: Mon, 18 Sep 2000 11:46:22 -0400
User-agent: Mutt/1.2i

Dixit Kevin Buettner <kevinb at cygnus.com> (2000-09-14 16:34):
> Also, it's possible to run commands in the shell via the `shell'
> command, so the original poster (Pierre) could put something like the
> following in his .gdbinit file:
> 
>     define hook-stop
>     shell clear_xgrab
>     end
> 
> Provided that a suitable external program called `clear_xgrab' was
> created, this would do what the original posted wanted.
> 
> (I still think it's better to use two machines to do this type of
> debugging though.)

I wrote a program that calls XUngrabServer(), but it did not have
any effect.  I added a call to XGrabServer() juste before, but still
without effect.  Perhaps a server grab is specific to each X11 client.
Ungrabbing from one X11 client would not affect grabs by other clients.

I also tried to run Xnest, as Gary Aviv suggested, but it
failed this way:

failed to set default font path 
'/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/Speedo/,/usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/75dpi/,/usr/X11R6/lib/X11/fonts/100dpi/'
Fatal server error:
could not open default font 'fixed'

I guess I could make these two solutions work if I hack at
them somewhat.  However, it would remain unusually complicated
to debug an X11 application under GDB.  A Windows programmer
would be quick to point out that this situation does not
happen on his platform.  (Although the drop down menu remains
displayed over the Visual Studio window...)  I would be curious
to know how this problem is handled under Windows.

I wouldn't mind patching my own copy of GDB to experiment
with XUngrabServer().  Could someone tell me what function
of the GDB sources I should study to do this?  I would like
to add some code where GDB writes its prompt.

-- 
Pierre Sarrazin <sarrazip at machinasapiens dot com>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]