On Sunday,  4 March 2007 at  0:22, Per Inge Mathisen wrote:
> 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.

Why? If gdb is in the path, you don't need the full directory, and if
it's not, how do you want to find it?

> * 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?).

Sounds like the wrapper script I sent a while ago:
https://mail.gna.org/public/warzone-dev/2007-02/msg00229.html
That seems like the easiest method, but you can also set up the signal
handler to run gdb on a crash, see for example
http://svn.mplayerhq.hu/mplayer/trunk/mplayer.c?revision=22429&view=markup
(search for exit_signalhandler, last part of the function). The wrapper
script seems easier and more flexible, though.

> 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

http://www.die.net/doc/linux/man/man5/core.5.html says: "By default, a
core dump file is named core, but the /proc/sys/kernel/core_pattern file
(new in Linux 2.5) can be set to define a template that is used to name
core dump files." But changing that file needs root access, so that's
not very practical.

> way of sending email from unix-likes, though. Also we must find a way

man mail. If gdb is available, mail should be, as well. If it's not,
jsut ask the user to send the file himself.

> 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.

-- 
BOFH excuse #246:

It must have been the lightning storm we had (yesterday) (last week) (last 
month)

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

Reply via email to