How to view disassembly in Code :: Blocks?

I read this article about some low-level C / C ++ reinforcements, and the author basically shows us the assembly code, the generated compiler, line by line. It uses VS 2010, but I do not do this, I use Code :: Blocks. How to view dismantling there? When I go to the debugger and click disassembly, it shows me an empty window ...

This is the C ++ code (.cpp) (all the code) that I compiled:

int main() { int x = 1; int y = 2; int z = 0; z = x + y; return 0; } 
+6
source share
1 answer

The kind of disassembly that the author shows in the article is called inter-leaved disassembly (C and disassembly alternating), which supports several IDEs, such as Visual Studio support. Code blocks are not supported. But code blocks have a separate disassembly window like this

Diassembly window

Select the source line. Right click. Say Run to Cursor . Now Debug->Debugging Windows->Disassembly . Instead of Run to cursor, you can also set breakpoints and then do it. But somehow it was not good with me, so I suggest the Run to Cursor method.

Hope this helps.

+6
source

Source: https://habr.com/ru/post/910249/


All Articles