Is it possible to dump the assembly language code of a binary using GDB?

I tried to use the "l" command but it says No symbol table is loaded. Use the "file" command.. I use the file command and it says the load symbol was loaded but when I try the "l" command again I see the same message. All I need is the whole assembly language code from that binary.


First off, don't apologize for a question. If you did prior research then you are fine. If you didn't take the time to google it, then do that first.

If you want the assembly of a program, then gdb might not be your program, instead try objdump; however, if you want to view the assembly while debugging use the gdb command disassemble once you've stopped at a given frame.

| improve this answer | |
  • @SpaceDog Indeed. Beware of the flags; on my phone cannot elaborate more. – Rui F Ribeiro May 19 '17 at 11:36
  • Don't necromance. This thread is over two years old and has an accepted answer. Your comment ads little to no additional info. – SailorCire May 19 '17 at 11:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.