x86 procedure calling convention (again)
phi gcc
phi.gcc@gmail.com
Thu Nov 8 08:10:00 GMT 2012
Hi Andrew,
The document you point out say page 3-11 'All incoming arguments
appear on the stack, residing in the stack frame of the caller.'
It is obvious that GCC don't care about this and assign some args
tosome (scratch) registers, the problem is that what arg goes in what
regs changes over time, and I need to know if there is a way to know
this. I need this to automate linux crash dump analysis, that look at
stack unwind programatically, and I recieve dumps from 'production
system' that run old frozen kernel. So basically I need to adapt to
gcc, to automate args retrieval and way obsolete gc :)
I have many heuristics for that, so far it works pretty well, but this
is pure reverse engineering and I wondered if gcc (internal?) doc
would explicitly describe what strategy they choose for a given gcc
version.
Cheers,
Phi
More information about the Gcc-help
mailing list