- Understanding the basics of assembly code
- Go over C++ code
- Debugging basics
clang++ -g main.cpp -o mainsi- step into instructionp $edi- print value in edix/2d $rbp-0x8- examine 2 ints in rbp
- Reading assembly
0x100000f60 <+0>...movl %edi, -0x8(%rbp)addl -0x8(%rbp), %eaxcallq 0x100000ed0
# Create debuggable executable
clang++ -g main.cpp -o main
# Run lldb
lldb ./main
b main # Breakpoint
n # Next
ni # Next instruction
s # Step into
si # Step into instruction
p $edi # print value in edi
x/2d $rbp-0x8 # examine 2 ints in rbp-
How to Read x86 Assembly?
-
How to Read x86 Assembly like English?
-
C++ Deep Dive: How to Read x86 Assembly Code
-
How to Read x86 Assembly Code | C++ Deep Dive for Beginners
-
C++ Assembly Deep Dive: How to Read x86 Assembly Code?
-
How to Read Assembly Code | C++ Tutorial for Beginners
-
x86 Assembly Language Tutorial for C++ Programmers
-
How to Read Assembly Code Like English | C++ Tutorial
-
How to Read C++ Assembly Code for Beginners
-
Intro to Assembly Code | C++ LLDB Tutorial
-
C++ Reverse Engineering: Understanding Clang Assembly in LLDB
In this C++ tutorial, we go over how to read assembly code generated by Clang. We start by understanding the sample C++ code, then we run the LLDB debugger and break on main. We go through each instruction in-depth to learn how the CPU uses mov, call, add, and jmp.
- ChatGPT and Gemini