Re: amusing gdb problem...

From: NickWKG (nickwkg_at_my-deja.com)
Date: 07/01/03


Date: 1 Jul 2003 07:26:44 -0700

Ulrich Eckhardt <doomster@knuut.de> 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.
> Notes:
> - 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
>
> Uli

Cheers,
Nick



Relevant Pages

  • Re: amusing gdb problem...
    ... > I'm trying to fix a segfault in a window manager I'm working on and am ... > running gdb and the system needs a reboot. ... to start a second X-server on VT8. ... use the DISPLAY environment-var to control where an X-client is displayed ...
    (comp.os.linux.development.apps)
  • Re: amusing gdb problem...
    ... nickwkg@my-deja.com writes: ... |>>> I'm trying to fix a segfault in a window manager I'm working on and am ... |>>> running gdb and the system needs a reboot. ...
    (comp.os.linux.development.apps)
  • amusing gdb problem...
    ... I'm trying to fix a segfault in a window manager I'm working on and am ... running gdb and the system needs a reboot. ... create a core dump and examine that after the reboot, ...
    (comp.os.linux.development.apps)
  • Re: Windows Debugging w/o MS
    ... I would like to debug this thing somehow. ... When you start your test now and it does not segfault before your ... Attach gdb to the process using the --pid option. ... Set a breakpoint immediately after the infinite loop. ...
    (comp.lang.python)