28th June 2022, 3 min read Looking at assembly code with gdb 5 thoughts on “Looking at assembly code with gdb” George Spelvin says: June 29, 2022 at 4:31 pm I generally use objdump -dr to look at generated code. While gdb can do it, objdump is the tool designed for the job. (There are arguments to select the range objdump disassembles, but I find it easier to just pipe the output through less and search.) Daniel Lemire says: June 29, 2022 at 8:16 pm I prefer gdb but it is true that objdump works well too. Oren T says: July 2, 2022 at 6:59 pm Godbolt? Daniel Lemire says: July 2, 2022 at 10:50 pm Godbolt is great but it is not always possible to use it conveniently. Jaskaran Singh says: July 8, 2022 at 8:16 pm Have you tried radare? Would be interesting to know your review of it.
I generally use
objdump -drto look at generated code.While
gdbcan do it,objdumpis the tool designed for the job.(There are arguments to select the range
objdumpdisassembles, but I find it easier to just pipe the output throughlessand search.)I prefer gdb but it is true that objdump works well too.
Godbolt?
Godbolt is great but it is not always possible to use it conveniently.
Have you tried radare? Would be interesting to know your review of it.