Hacker News new | ask | show | jobs
by gopalv 32 days ago
Gdb is an excellent debugger for assembly, even when the original code was written in C

I would automatically type

(gdb) x/4i $pc

when opening a coredump out of habit.

But using nasm, then looking as gas style assembly in the debugger might be a bit more jarring.

1 comments

"set disassembly-flavor intel" was one of the first customizations I made to gdb when I started using it in anger.
I once ported the runtime of my toy L98 compiler from Intel to AT&T syntax, it was enough as a learning exercise I don't plan ever to repeat, the reasoning was to only depend on GAS.

Alone the mental exercise to always convert into official documents and AT&T syntax isn't worth the trouble.