Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I disassemble my C source in CLion?

Tags:

clion

There's a number of reasons I have for wanting to view the ASM of my C program, but from what I'm discovering, it only seems possible to view the ASM of 3rd-party modules that don't have a src.

How can I view the ASM of my src?

like image 667
Tcll Avatar asked Oct 08 '17 12:10

Tcll


People also ask

What compiler does CLion use?

CLion supports the Microsoft Visual C++ compiler that ships with Visual Studio 2013, 2015, 2017, and 2019.

What is CLion used for?

CLion is more than just an editor as it offers a powerful debugger and dynamic analysis tools to investigate and solve problems with ease, built-in Google Test, Boost. Test, Doctest and Catch for unit testing, many popular VCS supported out of the box and more.


1 Answers

I had the same issue, but found a solution for clion. It however requires that you have the GDB debuggger.

  1. Set a breakpoint in the function that you want to disassemble
  2. Run the debugger
  3. When the breakpoint is hit, look down on in the debugger window, on the right panel, you should see GDB. Click on it
  4. Type: disassemble
  5. The disassembly of the function should be printed out in the same panel
  6. Enjoy.
like image 85
AKJ Avatar answered Sep 27 '22 22:09

AKJ