On Thu, 2009-10-15 at 11:11 -0700, Jonathan Ryshpan wrote:
> On Thu, 2009-10-15 at 11:43 -0400, Paul Smith wrote:
> > On Mon, 2009-10-12 at 15:02 -0400, Brian J. Murrell wrote:
> > > I have a neat little script which I use to get stack
> > > traces:
> >
> > Good stuff! I modified it to just display the output on stdout, then I
> > can put it where I want it by hand.
> >
> > Just a note: if you add "set pagination off" to your GDB script, then
> > you don't have to worry about the "type <return> to continue" messages,
> > redirecting from /dev/null, etc.
> >
> > I think I'll try to integrate this with my Makefile so that it grabs
> > core dump stacktraces by default when a core happens.
>
> Can you post an email with your latest version included or attached?
> Hopefully without the apport-unpack stuff, which isn't available on
> Fedora (though it would be a good idea to have something like this in
> Fedora).
Well, I wanted to integrate it with my "evolution-src" script that comes
with my build-evo-from-source makefile, so that if evo exited with a
core it would automatically generate the backtrace from the core.
After I took out everything I didn't need anymore, it came down to a
single line, that I wrapped in a loop so it would iterate over all the
cores in the directory; it's basically this:
#!/bin/sh
proc=$1
core=$2
gdb -batch -ex 'set pagination off' -ex 'thread apply all bt full' -ex
'bt' \
-core "$core" "$proc"
However this loses some functionality from the original, such as
attaching to a PID etc. (which I don't need in my situation). It does
do away with the batch file by using -ex operations which makes things
somewhat more straightforward.
I can go back and tweak out the original script if you like.
_______________________________________________
Evolution-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/evolution-list