Professional Documents
Culture Documents
Bomb Lab
1
Carnegie Mellon
Agenda
Overview of Bomb
Lab
Assembly Refresher
Intro to GDB
Unix Refresher
2
Carnegie Mellon
Bomb Lab
Oh no! Dr. Evil has written an evil program that will
“explode” the machines!
3
Carnegie Mellon
Bomb Lab
We give you:
4
Carnegie Mellon
Agenda
Overview of Bomb Lab
Assembly Refresher
Intro to GDB
Unix Refresher
5
Carnegie Mellon
6
Carnegie Mellon
Assembly: Operands
Data type Syntax Examples Notes
Immediate
$0x0 Don’t forget 0x
values (constant Start with $
$-15213 means hex!
integers)
Can represent a
%esi
Registers Start with % value or an
%rax
address
Parentheses Parentheses
around a (%esi) dereference. If
Memory register, or %esi stores an
locations addressing 0x8(%rax) address, (%esi)
mode – (%rax, %rsi, 4) is the value at
D(Rb,Ri,S) that address.
7
Carnegie Mellon
9
Carnegie Mellon
10
Carnegie Mellon
11
Carnegie Mellon
Agenda
Overview of Bomb Lab
Assembly Refresher
Intro to GDB
Unix Refresher
12
Carnegie Mellon
13
Carnegie Mellon
15
Carnegie Mellon
16
Carnegie Mellon
Agenda
Overview of Bomb Lab
Assembly Refresher
Intro to GDB
Unix Refresher
17
Carnegie Mellon
Unix Refresher
At the very least, you should be comfortable with:
▪ man to read manual pages
▪ cd to change directories
▪ ls to list contents of the current directory
▪ ls –l to list contents with extra info, including permission bits
▪ scp to send files between your computer and the Shark machines
▪ ssh to log into the Shark machines
▪ tar to tar (-cvf) and untar (-xvf) things (-z for optional gzip)
▪ chmod to change permission bits if necessary
▪ flags (e.g. –R to apply a command recursively to a folder)
Helpful hints: Tab autocompletes. An up arrow scrolls up
through your last few commands.
18
Carnegie Mellon
Agenda
Overview of Bomb Lab
Assembly Refresher
Intro to GDB
Unix Refresher
19