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: Kevin Buettner
Subject: Re: [Bug-gdb] GDB and X11 server grabs
Date: Mon, 18 Sep 2000 09:34:51 -0700

On Sep 18, 11:46am, Pierre Sarrazin wrote:

> 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 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.

Perhaps you need to use XUngrabPointer() ?

> 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.

Take a look at command_loop() in top.c.

However, if you can't get your clear_xgrab (or whatever you called it)
program to work, I don't think you'll have any more success via this
route.  Keep in mind that gdb is not part of the X11 client that
you're attempting to debug.  That being the case, it shouldn't matter
whether your ungrab code is in gdb or in a separate program.  (Either
it'll work in both places or fail in both places.)

Kevin


reply via email to

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