Date: | Fri, 3 Jun 2005 14:33:21 -0400 |
---|---|
From: | Weihang Jiang <weihang.jiang@xxxxxxxxx> |
Subject: | [Gems-users] Re: The process to get pid and related questions |
Sorry I forgot to attach it. Here is the assembly code of "reume". resume: save %sp, -0xb0, %sp resume+4: membar #Sync resume+8: flushw resume+0xc: stx %i7, [%g7 + 0x38] resume+0x10: stx %fp, [%g7 + 0x40] resume+0x14: ldx [%g7 + 0x110], %o4 resume+0x18: rd %fprs, %g4 resume+0x1c: brnz,pt %o4, +0x34 <resume+0x50> resume+0x20: ldx [%g7 + 0xa8], %i1 resume+0x24: ldx [%g7 + 8], %i2 resume+0x28: ldx [%g7 + 0x78], %g3 resume+0x2c: btst 4, %g4 resume+0x30: be,pt %icc,+0x48 <resume+0x78> resume+0x34: st %g4, [%i2 + 0x1b8] resume+0x38: add %i2, 0xb0, %o0 resume+0x3c: rd %gsr, %g5 resume+0x40: call -0xe740 <fp_fksave> resume+0x44: stx %g5, [%o0 + 0x120] resume+0x48: ba,a,pt %icc,+0x30 <resume+0x78> resume+0x4c: nop resume+0x50: ldx [%o4 + 0x100], %o0 resume+0x54: stx %fp, [%g7 + 0x40] resume+0x58: btst 4, %g4 resume+0x5c: st %g4, [%o0 + 0x108] resume+0x60: be,pt %icc,+0x18 <resume+0x78> resume+0x64: ldx [%g7 + 0x78], %g3 resume+0x68: ldx [%o4 + 0x100], %o0 resume+0x6c: rd %gsr, %g5 resume+0x70: call -0xe770 <fp_fksave> resume+0x74: stx %g5, [%o0 + 0x120] resume+0x78: mov %g0, %fprs resume+0x7c: brz,pt %g3, +0x10 <resume+0x8c> resume+0x80: ldx [%i0 + 0x118], %i3 resume+0x84: call +0x10fda0 <savectx> resume+0x88: mov %g7, %o0 resume+0x8c: ldx [%g7 + 0x118], %i2 resume+0x90: ldx [%i1 + 0x18], %o0 resume+0x94: ldx [%o0 + 0x40], %o1 resume+0x98: sub %o1, 0xb0, %sp resume+0x9c: clr %fp resume+0xa0: mov %g7, %l3 resume+0xa4: mov %o0, %g7 resume+0xa8: stx %o0, [%i1 + 0x10] resume+0xac: clrb [%l3 + 0xa0] I am running solaris 9 in opal/system/pseq.C, there is " // dereference virtual addresses plus offset (Solaris 9) la_t procp = M_PSTATE->dereference( thread_p + 0x110, 8 ); la_t pidp = M_PSTATE->dereference( procp + 0xb0, 8 ); int32 pid = M_PSTATE->dereference( pidp + 0x4, 4 ); #if 0 // Solaris 8 la_t procp = M_PSTATE->dereference( thread + 0x130, 8 ); la_t pidp = M_PSTATE->dereference( procp + 0xb0, 8 ); int32 pid = M_PSTATE->dereference( pidp + 0x4, 4 ); #endif " In step 6, I try both @thread = SIM_read_phys_memory(conf.cpu0, 0x3000010,8) @procp= SIM_read_phys_memory(conf.cpu0, SIM_logical_to_physical(conf.cpu0,Sim_DI_Data,thread+0x110),8) ^^^^^ @pidp= SIM_read_phys_memory(conf.cpu0, SIM_logical_to_physical(conf.cpu0,Sim_DI_Data,procp+0xb0),8) @pid= SIM_read_phys_memory(conf.cpu0, SIM_logical_to_physical(conf.cpu0,Sim_DI_Data,pidp+0x4),4) @print pid and @thread = SIM_read_phys_memory(conf.cpu0, 0x3000010,8) @procp= SIM_read_phys_memory(conf.cpu0, SIM_logical_to_physical(conf.cpu0,Sim_DI_Data,thread+0x130),8) ^^^^^^ @pidp= SIM_read_phys_memory(conf.cpu0, SIM_logical_to_physical(conf.cpu0,Sim_DI_Data,procp+0xb0),8) @pid= SIM_read_phys_memory(conf.cpu0, SIM_logical_to_physical(conf.cpu0,Sim_DI_Data,pidp+0x4),4) @print pid Using "0x110" offset, I always receive following errero message : Traceback (most recent call last): File "<string>", line 1, in ? sim_core.SimExc_Memory: No translation If using "0x130" offset, as I mentioned, the value of pid is always equal to 1. Thanks Weihang On 6/3/05, Min Xu (Hsu) <xu@xxxxxxxxxxx> wrote: Weihang, -- Weihang Jiang |
[← Prev in Thread] | Current Thread | [Next in Thread→] |
---|---|---|
|
Previous by Date: | Re: [Gems-users] running barnes-hut, yilmazer |
---|---|
Next by Date: | [Gems-users] Re: The process to get pid and related questions, Min Xu (Hsu) |
Previous by Thread: | [Gems-users] Re: The process to get pid and related questions, Min Xu (Hsu) |
Next by Thread: | [Gems-users] Re: The process to get pid and related questions, Min Xu (Hsu) |
Indexes: | [Date] [Thread] |