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: Freeciv Developers <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: autobacktrace (was: concerning the use of assert)
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Sun, 15 Sep 2002 11:04:09 +0000 (GMT)

On Fri, 13 Sep 2002, Jason Short wrote:
> For starters, what about the simple function:
...
> which should work fine for getting core without interrupting the current
> process.Fork is pretty nice about not messing with the parent process'
> resources.

Thanks. I'll try that.

> The extra handling you've been talking about could take place right at
> the end of this function:
>
> - Attach gdb to the core file (we must handle the case where gdb doesn't
> exist, or where cores are disallowed).
> - Get a backtrace, and possibly other information.
> - Save the current game (could be tricky if the save code is not
> re-entrant).
> - Perhaps get some other data: like the version number, build time, etc.

Build time is already there in the function (but not output to the file,
odd).

Anyway, as a beginning I think a simple environment variable that points
to a script like the one already at civserver will suffice, since having
this done automatically at civserver is a good first step. Other
players/server owners can send us manually. More advanced methods for
automatically sending us errors can be implemented later.

> - E-mail all the collected data to freeciv-reportbug@xxxxxxxxxxx.
> (Sending it to freeciv-dev is a bad idea since there could potentially
> be a *lot* of duplicates and not everyone will want the traffic).We
> must handle the case where there is no means to send mail; also do we
> need to ask the user before doing this?

Eventually we should have some kind of dialog to ask about this, yes. But
isn't the way we send mail rather different between platforms? So we would
need different scripts for this for different platforms, AFAIK.

> Note this would work for both server and client (although the client is
> less likely to have all of the helper programs present).

You mean gdb? Unless the platforms is a windows box, isn't that very
likely? Don't Sun boxen come with gdb too by default?

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]