Hacker News new | ask | show | jobs
by suprjami 4296 days ago
I wrote a little post up to show: https://gist.github.com/superjamie/72f7bf3b6a22371d24f7
1 comments

Great short intro! One other useful thing I'd add is that you don't have to have the register window open to see the contents of registers --- they can also be printed like other variables while you are in 'layout asm'. Or you can use 'layout split' which shows both source and assembly.

For example, "p/t $rax" will print the contents of %rax. Printing the floating point registers can be a little awkward, since they are written as a long union. But "p/f $xmm0.v2_double" will show just the two doubles, etc.

One thing I like about the register view is the highlighting on register change.

This is great when an instruction changes a register beyond a basic MOV/ADD/SUB.

Using register view ended up being the "lightbulb" moment which helped me understand how stack frames are built.