On Fri, May 7, 2010 at 5:13 PM, tester <solaris.ident...@gmail.com> wrote: >> # dtrace -n >> 'pid$target::a:18{tracemem(copyin(uregs[R_FP] - 8, 64), 64)}' -c ./a.out > > Hello Chad, > > Why do you need to subtract 8 from FP? Thanks
The disassembly showed the value of x being stored at $fp - 4: a+0x14: d0 27 bf fc st %o0, [%fp - 0x4] So I subtracted 8 and dumped the contents of memory from that location so that we'd see that value '6' stored in the second (4-byte) word from there. A little bit sloppy, as I could have dumped memory at %fp - 4 for exactly four bytes. Chad _______________________________________________ dtrace-discuss mailing list dtrace-discuss@opensolaris.org