6.828 Lecture 2 - C & gdb
No lecture video, but there are two sets of slides and a reading req for some bits of K&R:
- C: https://pdos.csail.mit.edu/6.828/2021/lec/l-c-slides.pdf
- gdb: https://pdos.csail.mit.edu/6.828/2021/lec/gdb_slides.pdf
- Req - K&R C
- 2.9 (Bitwise operators)
- 5.1 (Pointers and addresses) through 5.6 (Pointer arrays)
- 6.4 (pointers to structures)
-
Pointers add and subtract in increments of the base data’s length
-
Use the extern keyword! Extends function’s visibility to all files in the program.
-
Use
riscv64-unknown-elf-gdb
, notgdb
-
finish/advance
-
Breakpoints / watchpoints
-
info/list
-
layout next
-
It is well worth your time to spend an hour learning more about how to use [gdb].