Mine the Harvest

Screencast: Using gdb to view asm code and CPU registers

by on Feb.23, 2014, under College Stuff, Linux

My first (kind of cheesy) screencast using asciinema to show how easy it is to use gdb to view the asm code for a trivial C program and view the status of CPU registers, etc. I think it helps to learn gdb earlier rather than later, and thought it might be fun to use it to show some of what we are now covering in the class lectures and book (data path, registers, memory fetch / store, basic asm commands, etc.)

https://asciinema.org/a/7834

The embedded player cuts off a bit as my terminal was extra huge, but you can use the above link if you want to see the comments in full.


It also shows a few basics of navigating and controlling gdb’s text user interface, which is a feature well worth knowing about.

Provided you compile C code with -g (gcc) or asm code with -gstabs (as) you can use gdb on the resulting binary.

No comments for this entry yet...

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...