Week 5 Day 1 - GDB and 2D Arrays with ARM32

Channel:
Subscribers:
2,640
Published on ● Video Link: https://www.youtube.com/watch?v=X8gffCpYbv8



Duration: 2:00:53
156 views
0


Today we talked about the following things:
1) Using GDB to debug ARM32 assembly programs. It can be tough to debug assembly programs because you don't have the same support you have in C++ (with things like ASAN). So learning to use GDB is really important. In this video I show you the basics: A) b function_name to set a breakpoint, B) i r to print the registers, C) step and D) next to go to the next line of code, with step stepping into a function call and next stepping over it, and E) run to run the program until it ends or a breakpoint is hit. But there's a loooooooot more to GDB than this. It's a really neat program with a lot to it.
2) How 2D and 3D arrays are held in memory (row major order). They're actually all just 1D arrays, so I show you the algebra for mapping between 2D/3D arrays and 1D arrays, and gave assembly code for iterating across a large array while reading and writing to it.
3) Finally we talked about using assembly programming to disassemble and reverse engineer programs. Your next homework assignment will be removing copy protection from three programs I pushed out to you.







Tags:
csci45
gdb
row major ordering
arm32
2d array
3d array
assembly
reverse engineering
copy protection