ebp is the frame pointer and esp is the stack pointer. These two lines of code save the old frame and create a new stack frame. Procedure calls in assembly require this action
Create a stack frame, which can be optimized. Keeping this is mainly convenient for debugging, and you can trace the function call chain. unsigned long *p=ebp; *(p+1) is the return address of the calling function. p=*p is the frame of the upper-level function *(p+1) is the return address of the calling function of the upper-level function You can always trace it back to the top function through this.
This is related to the function stack frame. When a process starts, a stack frame will be created for the current process. The machine uses the stack to pass process parameters and store return information. %ebp is the frame pointer and %esp is the stack pointer. The two sentences you mentioned are stack building statements.
ebp is the frame pointer and esp is the stack pointer. These two lines of code save the old frame and create a new stack frame. Procedure calls in assembly require this action
Create a stack frame, which can be optimized. Keeping this is mainly convenient for debugging, and you can trace the function call chain.
unsigned long *p=ebp;
*(p+1) is the return address of the calling function.
p=*p is the frame of the upper-level function
*(p+1) is the return address of the calling function of the upper-level function
You can always trace it back to the top function through this.
This is related to the function stack frame.
When a process starts, a stack frame will be created for the current process. The machine uses the stack to pass process parameters and store return information. %ebp is the frame pointer and %esp is the stack pointer. The two sentences you mentioned are stack building statements.