Re: How to get stack from every thread when doing crash dump?
From: Marcel Moolenaar (marcel_at_xcllnt.net)
Date: 06/23/05
- Previous message: David O'Brien: "Re: Kernel Dump"
- In reply to: Xin LI: "How to get stack from every thread when doing crash dump?"
- Next in thread: Howard: "Re: How to get stack from every thread when doing crash dump?"
- Reply: Howard: "Re: How to get stack from every thread when doing crash dump?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 23 Jun 2005 11:19:01 -0700 To: Xin LI <delphij@frontfree.net>
On Jun 23, 2005, at 3:20 AM, Xin LI wrote:
> One problem with the mini-dump is that, since the mini-dump utilizes:
> dump_write((char *)curthread->td_kstack, curthread->td_kstack_pages *
> PAGE_SIZE);
>
> To write out the stack, and at the point before exception.S, curthread
> has
> been changed, we can only obtain the stack from the current thread,
> which
> may not be enough for analyzing the backtrace. What can we do to
> improve
> this situation?
You can iterate over all the threads. Take a look at
src/sys/kern/subr_kdb.c
or
src/gnu/usr.bin/gdb/kgdb/kthr.c
In particular:
Use the list of all processes (allproc) to iterate over the
processeses and for each process walk the list of threads
and for each thread dump the stack, registers and other data.
-- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net _______________________________________________ freebsd-arch@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arch To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
- Previous message: David O'Brien: "Re: Kernel Dump"
- In reply to: Xin LI: "How to get stack from every thread when doing crash dump?"
- Next in thread: Howard: "Re: How to get stack from every thread when doing crash dump?"
- Reply: Howard: "Re: How to get stack from every thread when doing crash dump?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- Re: pop method question
... A stack is defined to be an "ordered" list data ... does anyone know why the
python core has this pop method ... implemented for a dictionary type? ...
# can't iterate over the dictionary directly! ... (comp.lang.python) - Re: How to get stack from every thread when doing crash dump?
... On Jun 23, 2005, at 5:39 PM, Howard wrote: ... >> You can iterate
over all the threads. ... >> and for each thread dump the stack, ... (freebsd-arch) - Re: [newbie] stack with templates
... Writing a class template to implement a stack is good as an exercise, ...
but in real code one should use std::stack; ... To iterate is human, to recurse
divine; ... (alt.comp.lang.learn.c-cpp) - Re: How to get stack from every thread when doing crash dump?
... >> To write out the stack, and at the point before exception.S, curthread
... > You can iterate over all the threads. ... > Marcel Moolenaar USPA:
A-39004 marcel@xcllnt.net ... (freebsd-arch) - Re: Starting Forth, starting out.
... In LSE "depth drop iterate" clears the stack! ... compilation buffer
TOS times. ... (comp.lang.forth)