On Tue, Apr 11, 2006 at 08:22:15AM +0800, Oliver Yang wrote:
> Sorry for raising the question again, maybe my question is not very clear...
> 
> Actually, I need check the general register's value for a specific CPU 
> on MP system. But, it seems like ::regs couldn't meet my requirement. 
> Does anybody know the other way?

Typically, you want to look at the trap frame on the active thread on the
CPU.  I haven't done this on i386 in a while; can someone chime in with the
procedure?

On sparc, you just take the active thread on the cpu, do a ::findstack on it,
take the ktl0 frame address, and do:

        addr::print struct frame fr_local[7] | ::print struct regs

Cheers,
- jonathan

> -------- Original Message --------
> Subject:      [mdb-discuss] A question about ::regs
> Date:         Sun, 09 Apr 2006 11:55:41 +0800
> From:         Oliver Yang <Oliver.Yang at Sun.COM>
> To:   mdb-discuss at opensolaris.org
> 
> 
> 
> Hi,
> 
> I have a question about how to get registers' value on a MP system.
> 
> Now, I have 2P system, and I want to get registers' value for each of 
> CPU.  But  you know, ::regs  just can get only 1 CPU's general register 
> value. How can I get another CPU's register value?
> 
> >::cpuinfo -v
> ID ADDR     FLG NRUN BSPL PRI RNRN KRNRN SWITCH THREAD   PROC
> 0 fec22eb4  1b    1    0  49   no    no t-0    cca24800 Corrupt.auto
>              |    |
>   RUNNING <--+    +-->  PRI THREAD   PROC
>     READY                60 cba87de0 sched
>    EXISTS
>    ENABLE
> 
> ID ADDR     FLG NRUN BSPL PRI RNRN KRNRN SWITCH THREAD   PROC
> 1 cc1449c0  1f    0    0  59   no    no t-0    d6d23800 Corrupt.auto
>              |
>   RUNNING <--+
>     READY
>  QUIESCED
>    EXISTS
>    ENABLE
> 
> >::regs
> %cs = 0x0158            %eax = 0x60606060
> %ds = 0x0160            %ebx = 0xd6b9ebc0
> %ss = 0xfe95afdd                %ecx = 0x60606060
> %es = 0xfe530160                %edx = 0xcca24800
> %fs = 0xccbd0000                %esi = 0x60606060
> %gs = 0x01b0            %edi = 0xccbd6d70
> 
> %eip = 0xfe967901 fop_getpage+6
> %ebp = 0xccbd6cec
> %esp = 0xccbd6cd8
> 
> %eflags = 0x00010246
> id=0 vip=0 vif=0 ac=0 vm=0 rf=1 nt=0 iopl=0x0
> status=<of,df,IF,tf,sf,ZF,af,PF,cf>
> 
> %uesp = 0xccbd6d3c
> %trapno = 0xe
>  %err = 0x0
> >
> 
> _______________________________________________
> mdb-discuss mailing list
> mdb-discuss at opensolaris.org
> 
> _______________________________________________
> mdb-discuss mailing list
> mdb-discuss at opensolaris.org

-- 
Jonathan Adams, Solaris Kernel Development

Reply via email to