简体   繁体   中英

Output C++ code as assembly language in netbeans

I've looked around other threads for the answer. But none of them have really broken down what needs to be done in the ide to view the assembly output.

Try these after compiling your project:

  • UNIX

objdump -d a.out

  • Windows

dumpbin /DISASM a.exe

Yes, NetBeans can show you an assembly code. For that you need:

  • Compile your program with -g flag
  • Open your source in Editor window and set a breakpoint (for example, on the main function)
  • Start debugger by clicking Debug Project button or just hitting Ctrl-F5
  • Open disassembly window by clicking Window -> Debugging -> Disassembly button, which becomes clickable only after you start the debugger

The NetBeans will open a new window with assembly code next to the Editor window with C++ source.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM