On Thu, Mar 23, 2006 at 08:06:22PM -0800, Rabin Sugumar wrote: > After some poking around I figured this out. Here are the steps in case > someone is interested: > > > ::ps -l > > [dumps process information including lwp pointers; locate process and and lwp > of interest then] > > > [i]lwp_address[/i]::print klwp_t > > [dumps klwp_t struct; locate lwp_regs field] > > > [i]lwp_regs_address[/i]::print struct regs > > [dumps regs in user process prior to entry into kernel including pc]
Personally, I'd do this differently; first, the final two steps can be combined with a pipeline: > [i]addr[/i]::print klwp_t lwp_regs | ::print struct regs Finally, I'd use either ::pgrep or ::pidtoproc to get the proc structure address, and ::walk thread to get all of the thread addresses: > 0t1234::pid2proc | ::walk thread | ::print kthread_t t_lwp->lwp_regs | > ::print struct regs or > ::pgrep mutt | ::walk thread | ::print kthread_t t_lwp->lwp_regs | ::print > struct regs Cheers, - jonathan -- Jonathan Adams, Solaris Kernel Development