When you enter the debugger in VS and open the disassembly window, each fragment of the assembly is displayed below the corresponding code section (more or less). GCC with -S only displays the split node.
Is there an option in GCC to display some correspondence to the source code?
The source code is C ++.
Compile your code with gcc -g, then you can parse with objdump -S yourfile. this will give you disassembly interspersed with the source.
gcc -g
objdump -S yourfile
If you are asking about debugging, in gdb use the disassemble command with the / m flag (mixed):
(gdb) disas /m main
++, , , -g.
. , -S, , gcc , , . : , .
gcc yourFile.C -S -fverbose-asm
, , , .
Source: https://habr.com/ru/post/1749909/More articles:Select a link from a table with a single selector - javascriptDoesn’t use easy migration, and dozens of updates will kill performance? - iphoneСлушатель событий в PHP - phpHow to reset IIS (or otherwise clear the cache) when restarting a web application? - cachingstatic initialization confusion - c ++They say that Mercurial "hg clone" is very cheap ... but is it 400 MB on my hard drive? (on Mac OS X Snow Leopard) - mercurialhow to zoom with zest? - eclipseLiferay - no-fill authentication liferay db - liferayMatching Blob ID across multiple frames in C ++ (image analysis) - c ++What to do to improve my skills and knowledge in javascript? - javascriptAll Articles