Meeting Summary: CS 315-02 Lecture/Lab — Fall 2025¶
- Date: Sep 03, 2025
- Time: 07:00 PM Pacific Time (US and Canada)
- Meeting ID: 868 6589 0521
Quick Recap¶
Greg reviewed key assembly language concepts and demonstrated how to use GDB for debugging assembly code, emphasizing its importance for future courses. He covered: - Basic computer components and how instructions execute - The structure of the course starter code and how C and assembly integrate - How to compile and link C and assembly - Practical GDB usage: breakpoints, stepping, and viewing registers He also guided students through GDB debugging exercises, asked them to push their work to the lab repository, and noted recent auto-grader changes that may have caused initial issues.
Next Steps¶
- Complete the add_for and mul_for functions in Lab 2 and pass the autograder tests by 11:59 PM Pacific today (Sep 03, 2025).
- Demonstrate the ability to use GDB to debug assembly code.
- Read the GDB guides linked in the course materials.
- Push completed Lab 2 code to the repository.
- Set up the GDB configuration file at ~/.config/gdb/gdbinit as instructed in the lab sheet.
Summary¶
Assembly Language Debugging Techniques¶
- Reviewed core assembly topics: instructions, registers, labels, and directives, with emphasis on the constraints and structure of assembly.
- Demonstrated GDB for assembly debugging, noting that print statements are not straightforward in assembly.
- Covered:
- Setting breakpoints
- Stepping through instructions
- Inspecting register values
- Encouraged regular practice with GDB.
- Reminded students to complete add_for and mul_for and meet the deadline.
Computer Architecture: Basic Components¶
- Explained the core components of a computer system:
- CPU (processor)
- Memory
- Persistent storage
- Described CPU execution mechanics:
- Registers, the program counter (PC), and instruction words
- Instructions are 32 bits; the PC typically increments by 4 to fetch the next instruction
- Control flow can change (e.g., branches/jumps); more details to follow in the next session
Understanding Assembly and C Integration¶
- Reviewed the starter code structure, which includes both C and assembly implementations of functions.
- Explained the compilation and linking process for mixed C/assembly projects.
- Clarified that, at runtime, machine code calls machine code—language boundaries are a build-time abstraction.
- Discussed register conventions for passing arguments and returning values in assembly.
GDB Debugging Techniques Overview¶
- Demonstrated adding and inspecting function arguments in GDB.
- Showed how to:
- Set breakpoints
- Step into functions
- Examine register values
- Recommended configuring GDB by creating ~/.config/gdb/gdbinit.
- Encouraged independent practice to build fluency.
GDB Debugging Exercises for Students¶
- Walked through debugging exercises:
- Setting breakpoints
- Stepping through code
- Running tests
- Directed students to push code to the lab repository.
- Reiterated the importance of mastering GDB for future coursework.
- Noted that recent auto-grader updates may have caused initial hiccups.