You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How can we create a prototype in a .cspec file that fixes the problem where, for a function call, a compiler creates an additional pointer (to an object) placing it on the stack prior to, optionally any this pointer, followed by subsequent parameters?
A example is the MFC function call: CPoint CDC::SetViewportOrg(int x, int y)
which in Ghidra becomes: CPoint SetViewportOrg (CPoint * rPoint, CDC * this, int x, int y)
First, the function is returning an object - this is performed by creating that object prior to the actual call.
Second, a pointer to it is placed on the stack before/after (depending upon the calling convention) the optional this pointer and parameters.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
How can we create a
prototype
in a.cspec
file that fixes the problem where, for a function call, a compiler creates an additional pointer (to an object) placing it on the stack prior to, optionally anythis
pointer, followed by subsequent parameters?A example is the MFC function call:
CPoint CDC::SetViewportOrg(int x, int y)
which in Ghidra becomes:
CPoint SetViewportOrg (CPoint * rPoint, CDC * this, int x, int y)
First, the function is returning an object - this is performed by creating that object prior to the actual
call
.Second, a pointer to it is placed on the stack before/after (depending upon the calling convention) the optional
this
pointer and parameters.Beta Was this translation helpful? Give feedback.
All reactions