Why always 6 parameters are shown for functions in a callstack generated on Solaris?
Why do the functions displayed in a callstack generated in Solaris always contain 6 parameters?
In most of the cases, the original function will not be having 6 parameters at all. Sometimes I also find, the parameter values displayed are not matching开发者_JAVA技巧 the order in function declaration.
Any pointers or links for understanding these concepts and debugging in Solaris will be helpful.
I believe, depending on your version of Solaris (64 bit?), that the calling convention specifies the first 6 parameters of a function be passed by registers. Even if they're not being used, your debugger may just be showing the contents of these 6 registers.
Edit: from http://publib.boulder.ibm.com/httpserv/ihsdiag/get_backtrace.html#pstack
Note that pstack doesn't know how many arguments there are so it always displays six. So if you know that some function has only two arguments, ignore whatever pstack displays after the first argument.
精彩评论