On 22 Jan 2004, at 11:42, Henrik Nordstrom <hno@squid-cache.org> wrote:
> On Thu, 22 Jan 2004, Andres Kroonmaa wrote:
>
> > If you know the function, then you can try create gdb script that
> > after breaking at some line of the function enables hardware write
>
> The problem is that I don't know the function.
Oh, I understood you know the func that crashes, but not other funcs
that are called from there and causes this...
So you need to find last function that was entered normally.
If you can't recover this from stack anyhow, then you need some separate
source for indirect hint. Ideally, imo, there could be compiletime
option to set some global var to __func__. Then during a crash like this
at least you know what was the function. Its separate from stack and
at least one is expected to be intact. This could actually be inserted
to debug macro. Would be quite low impact mod.
Other ideas is to have nesting trace kept by app itself. Some array of
string pointers and global array index var. Then each function having
to do 2 things: during enter, set array[index++]=__func__ and during
leave index--. This would leave global array hinting on backtrace during
such crashes. Leave seems troublesome. But then, make a ring buffer
thats updated only during enter.
Also, regarding indirect hints, it crossed my mind that you could try
check out state of *xprof_Timers array. Profiling probes are reset every
second by event, thus probes that have stop timestamp zero mean active
probes. If you can deduce from core all active profiling probes, you
can hopefully narrow down area of sourcecode considerably. Infact with
stop timestamps you can even deduce most recent history of probes.
------------------------------------
Andres Kroonmaa <andre@online.ee>
CTO, Microlink Data AS
Tel: 6501 731, Fax: 6501 725
Pärnu mnt. 158, Tallinn
11317 Estonia
Received on Thu Jan 22 2004 - 05:29:05 MST
This archive was generated by hypermail pre-2.1.9 : Sat Jan 31 2004 - 12:00:10 MST