/cos284

COS 284 Notes

MIT LicenseMIT

COS 284

A collection of notes and tips that works for me. Pull Requests are welcome.

Development Environment

Debugging

GDB

GDB provides the most powerful tools for debugging, such as viewing specific memory addresses using a certain format. The only problem is the terminal output often breaks, especially if there are problems in the code.

gdb-layout

If GDB does not give you the above layout by default, try the following:

$ gdb <executable>
layout regs

Visual Studio Code

Not as powerful as GDB but might be more reliable.

vscode-debug

  • Follow installation and usage instructions for Native Debug
  • An example workspace is configured in examples/hello-world/hello-world.code-workspace
  • Watch registers using $rax, $rsp, etc

Useful Links