Week 5 Day 1 - GDB and 2D Arrays with ARM32
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.
Other Videos By Bill Kerney
2021-02-17 | Week 5 Day 1 - Invalid / Valid / Sound Arguments II |
2021-02-17 | Week 6 Day 1 - C++ Trivia: Const |
2021-02-16 | Week 6 Day 1 - Water and Landscapes III |
2021-02-16 | Week 6 Day 1 - Midterm Review and Generations of Architectures |
2021-02-12 | Week 4 Day 3 - Invalid / Valid / Sound Arguments |
2021-02-12 | Week 5 Day 2 - Dynamic Materials II - Water |
2021-02-11 | Week 5 Day 2 - Syscalls |
2021-02-11 | Week 4 Day 2 - Fallacies Part 1 |
2021-02-10 | Week 5 Day 2 - Linked List II |
2021-02-10 | Week 5 Day 1 - Dynamic Materials and Water |
2021-02-09 | Week 5 Day 1 - GDB and 2D Arrays with ARM32 |
2021-02-08 | Week 4 Day 1 - Scratch Part 2 |
2021-02-08 | Week 5 Day 1 - Linked Lists |
2021-02-06 | Week 3 Day 3 - Scratch |
2021-02-05 | Week 4 - Tracelines and Bounding Boxes |
2021-02-05 | Week 4 Day 3 - TDD and Linked Lists |
2021-02-04 | Week 4 Day 2 - UE4 Materials |
2021-02-04 | Week 4 Day 2 - Embedded ASM and Name Mangling |
2021-02-04 | CSCI 1 Week 3 Day 2 - Moral Frameworks |
2021-02-03 | Week 4 Day 2 - Big O Notation |
2021-02-02 | Week 4 Day 1 - Landscape and Foliage |