Professional Documents
Culture Documents
Debuggers Introduction: Assembly Language Programming by Xorpd
Debuggers Introduction: Assembly Language Programming by Xorpd
◦ What is a debugger?
Resume Pause
Target running
• Read / Change state
• Set future pausing
Target paused conditions.
• Ask program to
resume.
Resume Pause
Target running
• wait
Resume Pause
• Look inside
• Add/Remove fruit
• Clean Blender
• Start Blender
Resume Pause
• Wait
• Stop blender
Most of the interesting things could be done
while the target is paused:
INT 3
◦ Trap to debugger.
◦ Encoded as 0xcc
Original opcode: 29 d0
Example:
Target program
01 c0 add eax,eax
05 05 00 00 00 add eax,5h
cc int 3
d0 ; Leftovers
40 inc eax
Example:
Target program
01 c0 add eax,eax
05 05 00 00 00 add eax,5h
cc int 3
d0 ; Leftovers
40 inc eax
Example:
Target program
01 c0 add eax,eax
05 05 00 00 00 add eax,5h
cc int 3
d0 ; Leftovers
40 inc eax
Example:
Target program
01 c0 add eax,eax
05 05 00 00 00 add eax,5h
cc int 3
d0 ; Leftovers
40 inc eax