Date: Fri, 24 Jun 2005 08:39:04 +0800 From: Howard <howardsue@gmail.com> To: Marcel Moolenaar <marcel@xcllnt.net> Cc: freebsd-arch@freebsd.org Subject: Re: How to get stack from every thread when doing crash dump? Message-ID: <1e89cd5105062317397399075e@mail.gmail.com> In-Reply-To: <b7c2cad4fe3d363722ecaed9f1e502e7@xcllnt.net> References: <20050623102024.GA89874@frontfree.net> <b7c2cad4fe3d363722ecaed9f1e502e7@xcllnt.net>
next in thread | previous in thread | raw e-mail | index | archive | help
2005/6/24, Marcel Moolenaar <marcel@xcllnt.net>:=20 >=20 > On Jun 23, 2005, at 3:20 AM, Xin LI wrote: >=20 > > One problem with the mini-dump is that, since the mini-dump utilizes:= =20 > > 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,=20 > > which > > may not be enough for analyzing the backtrace. What can we do to > > improve > > this situation? >=20 > You can iterate over all the threads. Take a look at > src/sys/kern/subr_kdb.c=20 > or > src/gnu/usr.bin/gdb/kgdb/kthr.c >=20 > 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.=20 However is dumping the td_kstack_pages enough to get one thread's stack? W= e=20 found the stack is not completed. Thanks, =20 -- > Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net=20 >=20 >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1e89cd5105062317397399075e>