Re: How to get stack from every thread when doing crash dump?
From: Howard (howardsue_at_gmail.com)
Date: 06/24/05
- Previous message: Marcel Moolenaar: "Re: How to get stack from every thread when doing crash dump?"
- In reply to: Marcel Moolenaar: "Re: How to get stack from every thread when doing crash dump?"
- Next in thread: Marcel Moolenaar: "Re: How to get stack from every thread when doing crash dump?"
- Reply: Marcel Moolenaar: "Re: How to get stack from every thread when doing crash dump?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 24 Jun 2005 08:39:04 +0800 To: Marcel Moolenaar <marcel@xcllnt.net>
2005/6/24, Marcel Moolenaar <marcel@xcllnt.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.
However is dumping the td_kstack_pages enough to get one thread's stack? We
found the stack is not completed.
Thanks,
-- > 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: Marcel Moolenaar: "Re: How to get stack from every thread when doing crash dump?"
- In reply to: Marcel Moolenaar: "Re: How to get stack from every thread when doing crash dump?"
- Next in thread: Marcel Moolenaar: "Re: How to get stack from every thread when doing crash dump?"
- Reply: Marcel Moolenaar: "Re: How to get stack from every thread when doing crash dump?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|