Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2002:
[Freeciv-Dev] Re: autobacktrace (was: concerning the use of assert)
Home

[Freeciv-Dev] Re: autobacktrace (was: concerning the use of assert)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Reinier Post <rp@xxxxxxxxxx>, "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: autobacktrace (was: concerning the use of assert)
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Fri, 13 Sep 2002 15:40:22 +0000 (GMT)

On Fri, 13 Sep 2002, Reinier Post wrote:
> I'm not sure it makes that much of a difference, you can start gdb,
> atach it to the pid of a current civserver process, stop it,
> print the backtrace, continue, and detach.But I don't really
> see what to look for while running, and keeping the debugger attached
> all the time may slow the game down too much.I never tried this.

We don't need to have it attached all the time. We can freeze the server
on an error, launch and attach gdb, print a backtrace to a log, kill gdb
and then thaw the server and continue execution. The users will notice a
hiccup, but it is much better than a crash.

Another option may be to fork() off a clone of the current process, then
abort() it so that you generate a core file from that. This should be
faster, but I don't know how this will affect our open files and allocated
memory.

Yours
Per

"I don't see why people are so upset about cloning sheep. American
television networks have been doing that to their audiences for years."
-- Jello Biafra




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