Thank you, Roland, Roland Mainz wrote: > Jason Zhao wrote: > >> Adam Leventhal wrote: >> >>> Hi Jason, >>> >>> It would appear that your shell is a 32-bit process and you're >>> recording the stack on entry to exece rather than the return. That is >>> to say, you're recording the stack of your shell rather than the stack >>> of the 64-bit ls process: >>> >>> # dtrace -n 'syscall::exece:return{ stack(); ustack(); }'dtrace: >>> description 'syscall::exece:return' matched 1 probe >>> CPU ID FUNCTION:NAME >>> 1 82155 exece:return >>> unix`sys_syscall32+0x1fc >>> >>> 0xfffffd7fff3bd8da >>> >> Yes, my shell is 32-bit, as following: >> >> # file /usr/bin/bash >> /usr/bin/bash: ELF 32-bit LSB executable 80386 Version 1 [FPU], >> dynamically linked, stripped >> >> In other words, I should have run 64-bit bash other than 32-bit one. So >> that I could get 64-bit address. >> > > Solaris doesn't ship a 64bit version of "bash" (yet ; I'll work on that > soon), right now the only 64bit shell shipped with the OS is ksh93, e.g. > - /usr/bin/ksh93 is a link to "isaexec" which selects a 32bit or 64bit > version of ksh93 based on /usr/bin/isalist output > - /usr/bin/i86/ksh93 is 32bit/i386 > - /usr/bin/amd64/ksh93 is 64bit/AMD64 > - /usr/bin/sparcv7/ksh93 is 32bit/SPARC > - /usr/bin/sparcv9/ksh93 is 64bit/SPARC > - /usr/bin/s390/ksh93 is 32bit/SystemZ > - /usr/bin/s390x/ksh93 is 64bit/SystemZ > > ---- > It seems like the 64-bit address not only depends on shell type, but also depends on utilities(commands) you run. I run "/usr/bin/ls" got 32-bit, but "/usr/bin/amd64/ls" got 64-bit address. Is that because 32-bit application map to memory with 32-bit address? How the address space is mapped out for a 64 bit application and for 32-bit application?
# file /usr/bin/amd64/ksh93 /usr/bin/amd64/ksh93: ELF 64-bit LSB executable AMD64 Version 1 [SSE FXSR FPU], dynamically linked, not stripped, no debugging information available # /usr/bin/amd64/ksh93 # dtrace -n 'syscall::exece:return{ stack(); ustack(); }' dtrace: description 'syscall::exece:return' matched 1 probe CPU ID FUNCTION:NAME 0 59013 exece:return unix`_sys_sysenter_post_swapgs+0x14b <----- run /usr/bin/amd64/ls 0xfffffd7fff3bbaea 0 59013 exece:return unix`_sys_sysenter_post_swapgs+0x14b <---- run /usr/bin/ls 0xfefc50c2 Thanks Jason > Bye, > Roland > >