Am Sonntag, 4. März 2007 schrieb Per Inge Mathisen:
> On 3/4/07, Dennis Schridde <[EMAIL PROTECTED]> wrote:
> > So what do you think should be done?
> > Leave it as is (was before my commits) and don't try to automate the
> > backtrace creation? Or offer a way to assist unexperienced users to
> > create a backtrace? If yes, how?
>
> I don't know. The linux backtrace stuff that is in now is not very
> helpful. I think if we could generate a backtrace with gdb and make it
> ready to send to us somehow, that would be great. Let me do some very
> quick and dirty thinking aloud:
>
> * During ./configure (or whatever) we find the path to gdb and an
> email app, and write that into a "wz2100" script that we generate from
> a "wz2100.in" template.
>
> * Instead of starting the C binary directly, we run it through the
> wz2100 script generated above, which sets ulimit to produce core
> dumps, and checks for a core dump already produced, and if there is
> one, offers to send an anonymous backtrace from it to some email
> address we use for collecting them. It can also grab some system data
> to send from various sources (uname? /proc?).
We could check $? for the return status... And on error zip up the coredump 
and ask the user to send it to us.
I think it will be hard to send it via email directly, since there is no 
standard way of sending mails on Linux systems. Some systems have "mail", but 
it may not be setup correctly (From-address, email-gateway, etc.), while most 
systems probably haven't got that kind of program at all. And writing scripts 
to detect KDE, Gnome, and whatnot is probably not easy either.

So I think just giving the user a notice to please send us that file is the 
best and easiest solution.

The problem with that is of course that it doesn't work if the user starts wz 
from a menu. In that case we would need to pop up some tiny textbox. KDE 
offers a small commandline utility named "kdialog", which can display a 
textbox, or yes/no buttons and all that.

I think it's getting hairy now...


> I do not know of a good way to direct core dumps to a specific
> location, where we know to find it, or what is a good crossplatform
> way of sending email from unix-likes, though. Also we must find a way
> for this script to interact nicely if it is started from a GUI menu
> instead of from a command-line - I do not know how hard this is, I am
> a hardcore command-line junkie and hardly ever use those fancy menu
> things.
Coredumps are afaik in the "current directory", wherever that is...
But probably, if we don't chdir too much, the directory the startup script is 
running from should be the same that Warzone is running in.

>
> As I said, this is just some thinking aloud...
What I am currently thinking about:
On error signal create a pipe and run a command similar to this:
gdb argv[0] getpid()
Now push commands like "backtrace full" through the pipe and dump the output 
we recieve into a file.

Attachment: pgpSgGWuLC4py.pgp
Description: PGP signature

_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to