Re: amusing gdb problem...
From: NickWKG (nickwkg_at_my-deja.com)
Date: 1 Jul 2003 07:26:44 -0700
Ulrich Eckhardt <firstname.lastname@example.org> wrote in message news:<bdri53$100mb8$1@ID-178288.news.dfncis.de>...
> NickWKG wrote:
> > I'm trying to fix a segfault in a window manager I'm working on and am
> > trying to debug the thing using gdb. The problem is that once the
> > window manager dies I can't give focus back to the xterm that's
> > running gdb and the system needs a reboot.
> Firstly, Ctrl-Alt-Backspace will kill the X-server. No rebooting necessary.
Ahh, sadly not. I don't know why, but using gdb with the window
manager seems to cause the machine to hang. I'll try again tonight.
This is why I think using core dumps may be the way forward.
> Secondly, I'd suggest that you do
> startx -- :8
> (no it's not a smiley) to start a second X-server on VT8. There, you can
> start your WM and - while debugging it - use Ctrl-Alt-F7/F8 to switch back
> and forth between them.
> - I never tried running startx from inside X but only from console
> - you might be able to use xnest or somesuch to 'nest' a second xserver
> inside the original instead
> - use the DISPLAY environment-var to control where an X-client is displayed
> (a WM is one of them!)
> - you might have to add a second user when running fancy
> desktop-environments that can't cope with multiple parallel sessions
> happy hacking