userInThisWorld
userInThisWorld

Reputation: 1391

Disassembler Visual Studio C++

I am using debugging in Visual Studio and disassembler window to get the instruction code in hex, but when the main call a function (as Fig.1), the function instructions appear in a sperate section (as Fig. 2) Is there any way to show the function instructions appears as a part of the main?

main section in dissasembler window main section idisassemblerer window

function section in dissasembler window function section in dissasembler window Thanks,

Upvotes: 1

Views: 1599

Answers (2)

rustyx
rustyx

Reputation: 85256

Based on mov eax, 0CCCCCCCCh it seems you're working with a Debug build.

In Debug mode Visual Studio does not inline any function by default.

You can switch to Release mode or enable function inlining in compiler settings (C/C++ - Optimization - Inline Function Expansion) and the call to fun() will probably get inlined.

Upvotes: 1

SoronelHaetir
SoronelHaetir

Reputation: 15164

Disassembly is always going to be a separate window, there are options on the context menu for the disassembly window that allows you to control what is shown (source code or not, or instruction addresses or not, for example).

Upvotes: 0

Related Questions