On 23 Jan 2004, at 15:07, Henrik Nordstrom <[EMAIL PROTECTED]> wrote:
> On Fri, 23 Jan 2004, Andres Kroonmaa wrote: > > > This works with 3.0 only. But for fun, I tried to extract latest probe > > trace from a core I had. After some scripting, you'd get something like > > this, which is intact even when stack is completely smashed. > > Cool. > > It would be quite interesting to add something like this in the SEGV > handler of Squid-3. Is it worth the effort? have core and with scripts its easier. I think for more general approach, it would make sense to arrange ifdefed code that creates some global ringbuffer, global counter, and debug() macros to do something like: array[index++ & 0xff] = __FUNCTION__ besides other stuff. This would leave more precise and verbose trace of last N^2 debug statements that have been passed. After you identify the function that crashes, you can take approach I suggested initially to catch the crash with gdb and have full backtrace just before stack gets smashed. ------------------------------------ Andres Kroonmaa <[EMAIL PROTECTED]> CTO, Microlink Data AS Tel: 6501 731, Fax: 6501 725 P�rnu mnt. 158, Tallinn 11317 Estonia
