Automatic backtrace [Was: Re: NetAPP/Samba 3.0/plugs]

Esh, Andrew AEsh at tricord.com
Thu Mar 14 07:40:04 GMT 2002


The part I am missing is how the panic action can find out what the log file
is. Do we need another macro, or does all panic action output go to the log
anyway?

-----Original Message-----
From: Tim Potter [mailto:tpot at samba.org]
Sent: Wednesday, March 13, 2002 4:02 PM
To: Andrew Bartlett
Cc: Esh, Andrew; Samba Technical Mailing List
Subject: Re: Automatic backtrace [Was: Re: NetAPP/Samba 3.0/plugs]


On Thu, Mar 14, 2002 at 08:47:39AM +1100, Andrew Bartlett wrote:

> > "Esh, Andrew" wrote:
> > 
> > Can the smbd process pid be passed to a panic action?
> 
> Yes, %d.  I have a panic action that opens an xterm with gdb already in
> it.
> 
> What I think would be nice is if we could make the stdout/stderr of
> 'panic action' end up in the current logfile.  That should not be that
> hard actually...
> 
> Then, by using echo "bt full" | gdb /proc/%d/exe %d  we have the
> backtrace in the logfile.  The tricky bit is getting the path to the exe
> and the gdb stuff portably, not the actual script.

You can get all this information with autoconf.  The gdb part is easy.
If you're not running on Linux then you might be able to use argv[0]
as the path to the executable or some other combination of tricks.


Tim.
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the samba-technical mailing list