Re: how to debug a program when the session freezes



Elijah Newren wrote:

On 1/9/06, Andrew Sobala <aes gnome org> wrote:
Rod Butcher wrote:

Can somebody tell me how to get a gdb trace when the app I'm debugging
freezes my X session ? I'm running gnome-system-monitor from a
terminal : gdb gnome-system-monitor which freezes up the X session when
I click on the top menu line. The only way I can get out is by by
al-ctl-f1 and killing the X session from the linux command line. How do
I send the gdb output to a file for later retrieval, and is it possible
to get the stack trace some other way, without X ?
thanks


You can control-alt-F1 first, export DISPLAY=:0, then run gdb from
there. The app should appear in your X session, but gdb will run in the
terminal.

Well, you might have access to the Xserver denied depending on your
distro's setup and handling of X, so this wouldn't work for everyone
without more effort.

Yes, this is assuming you're not using a distro with an annoying security setup ;-)

In the times that I've had access problems with X, running "xhost +" (which doesn't require root access on Ubuntu) has fixed it. That allows access to the X server by everyone; man xhost tells you what the finer grained controls are.

However, there may be situations where this doesn't work. I know virtually nothing about X security.

--
Andrew



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