system calls
none yet
its bytes
no call crossing
registers
rsp
7fffffffeca8
hello.c
lines 5 to 7 of 11
5
char
buf
[
32
]
;
6
int
f
=
open
(
"note"
,
0
)
;
7
int
n
=
read
(
f
,
buf
,
32
)
;
disassembly
main
4011
84
4
sub
rsp, 0x50
4011
88
mov
rax, fs:[0x28]
4011
91
mov
[rbp - 8], rax
4011
95
mov
[rbp - 0x34]
, 0
4011
9c
6
lea
rdi, [rip + 0xe61]
4011
a3
xor
esi, esi
4011
a5
mov
al, sil
4011
a8
call
401070
open@plt
4011
ad
mov
[rbp - 0x38], eax
4011
b0
7
mov
edi, [rbp - 0x38]
4011
b3
lea
rsi, [rbp - 0x30]
4011
b7
mov
[rbp - 0x48], rsi
rdi
402004
"note"
rsi
0
al
0
open
("note", O_RDONLY)
stack
19 words · offsets from rsp · the frames they belong to
rsp
+0
7fffffffe
ca8
4011ad
main+45
+8
7fffffffe
cb0
0
+10
7fffffffe
cb8
0
+18
n, high half
7fffffffe
cc0
0
+20
f, low half
7fffffffe
cc8
0
+28
buf
7fffffffe
cd0
0
+30
buf+8
7fffffffe
cd8
0
+38
buf+10
7fffffffe
ce0
0
+40
buf+18
7fffffffe
ce8
0
+48
7fffffffe
cf0
0
+50
7fffffffe
cf8
0x4434195f31f30300
rbp
+58
saved rbp
7fffffffe
d00
7fffffffedb0
+60
7fffffffe
d08
7ffff7c27781
libc+27781
+68
7fffffffe
d10
7ffff7fe0c60
ld.so+22c60
+70
7fffffffe
d18
7fffffffee38
7fffffffefe8
".…
+78
7fffffffe
d20
0x1f7fbe000
+80
7fffffffe
d28
401180
main
+88
7fffffffe
d30
7fffffffed70
+90
7fffffffe
d38
7ffff7fdf260
ld.so+21260
open@plt
main
libc+27781
main puts open's arguments in registers:
"note" in rdi, O_RDONLY in rsi.
The call pushes the way back, main+45,
and goes down to the stub.
moment 7 of 46