y86 Debugger
Timeline: Jan 2020
I did this project with one friend for UBC’s CPSC 313 course - it is one of my favorite school projects because seeing a working debugger on my terminal, as well as being able to say “I debugged a debugger!” felt like some of the coolest things that happened to me!
In this project, we wrote a C program that interprets and executes Y86-64 assembly instructions based on input commands from the user, and thus behaves like a debugger for the Y86-64 language (similar to what GDB does for C/C++). The input commands from the user determine whether we will fetch or execute an instruction at a given time. Fetching an instruction means reading the required number of bytes from the memory location at which the input program is stored, and setting CPU register values based on the values of the bytes. Executing an instruction means setting the values of CPU registers, or values in memory, thus modifying the current state of the CPU and preparing for the next instruction that will be executed.
Our debugger accepts a variety of user commands, including but not limited to step, run, jump, adding and deleting a breakpoint, examining register values, and quit!:)