Skip to content

Instantly share code, notes, and snippets.

@fgsahoward
Created June 11, 2018 14:11
Show Gist options
  • Save fgsahoward/3a30f9ca994c9f7ee3f3448291c0d983 to your computer and use it in GitHub Desktop.
Save fgsahoward/3a30f9ca994c9f7ee3f3448291c0d983 to your computer and use it in GitHub Desktop.
Before call to Function1:
Register Value on stack Memory Address Notes
-----------------------
| saved %eip | 0xbfffffd0
----------------------- ----
%ebp -> | saved %ebp | 0xbfffffcc |
----------------------- | Main's stack frame
| local variables | 0xbfffffc8 |
%esp -> | .......... | 0xbfffffc4 |
----------------------- ----
After call to Function1:
-----------------------
| saved %eip | 0xbfffffd0
----------------------- ----
| saved %ebp | 0xbfffffcc |
----------------------- | Main's stack frame
| local variables | 0xbfffffc8 |
| .......... | 0xbfffffc4 |
----------------------- ----
| saved %eip | 0xbfffffc0
----------------------- ----
%ebp -> | saved %ebp | 0xbfffffbc |
----------------------- |
| local variables | 0xbfffffb8 | Function1's stack frame
| .......... | 0xbfffffb4 |
%esp -> | .......... | 0xbfffffb0 |
----------------------- ----
After Function1 returns:
-----------------------
| saved %eip | 0xbfffffd0
----------------------- ----
%ebp -> | saved %ebp | 0xbfffffcc |
----------------------- | Main's stack frame
| local variables | 0xbfffffc8 |
%esp -> | .......... | 0xbfffffc4 |
----------------------- ----
| saved %eip | 0xbfffffc0
-----------------------
| saved %ebp | 0xbfffffbc
-----------------------
| local variables | 0xbfffffb8
| .......... | 0xbfffffb4
| .......... | 0xbfffffb0
-----------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment