Karlan Mitchell wrote:
> I've downloaded SVN, however I cannot find a good way to integrate the crash
> agent into that brutal Configure script I added functionality for the user to
> view the report to be sent.  I've also added A LOT of documentation.  If you
> can integrate it into gtk-gnutella, I would willing to be SVN manager of that
> code.  I just need the build system explained a little....
 
> Download:
> http://distweb.sourceforge.net/crash_agent.tar.bz2

I think the crash agent is a good idea in general but I don't quit like how it
works. If I see correctly, it would be running the whole time and the
application runs in gdb. Also I don't see why it should be integrated into
gtk-gnutella. The crash agent is - or should be - a stand-alone application
which should be usable for any other application.

I've added a command-line switch to gtk-gnutella in SVN called
"--exec_on_crash". This will cause gtk-gnutella to execute to specified program
with argv[0] (usually "gtk-gnutella") and process ID as arguments.  Well, it's
not really ready for prime time but in general that's how it should work.

This requires these two scripts though:

/path/to/crash.sh:
#! /bin/sh
# Params ARGV0 PID
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
export HOME USER SHELL PATH
exec gdb -q -n -x @GDB_SCRIPT@ "$1" "$2" >> ~/.gtk-gnutella/crash.log 2>&1

The above is of course just a template, @HOME@ etc. has to replaced
with the actual value. The reason for this is that the script is
executed with an empty environment. @GDB_SCRIPT@ would take the path
to this script:

/path/to/crash.gdb:
backtrace full
kill
quit

The latter is the most awkward. It's required because you can't just pipe these
commands to gdb as you'd do with almost any other command-line application.
gdb's event loop has been broken for years. I tried some tricks but none of
them worked reliably.

Anyway, the script could very well be replaced with your crash agent which
would be more comfortable for the common user.

-- 
Christian

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Gtk-gnutella-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel

Reply via email to