Sign in to follow this  
shultays

assembly code in visual studio

Recommended Posts

is there any tool in visual studio that can convert my code into assembly one? i am trying to see that how things work in assembly. i can do that using debug mode but in debug mode it adds some extra code for debugging purposes and it really confuses me. are there any other way to do that? or maybe another tool for me that can do the samething that visual studio does without adding debug codes?

Share this post


Link to post
Share on other sites
If you're asking about C++ code, you can just use the /FA family of switches, also available under Output Files in Project Properties, C/C++.

Share this post


Link to post
Share on other sites
Go into Project->Properties, and Configuration Properties -> C/C++ -> Output Files, and on Assember Output select what output you want. Usually you'll want Assembly With Source Code. A .asm file will be output for each cpp file, into the Release or Debug folder, the one present in the same folder as your source files by default. It will contain the assembly-code that each part of your source has been compiled to, together with the original C++ source code so you can see what code generates what assembly (if you go with the asm with source option).

Share this post


Link to post
Share on other sites
You could also do a Step Into, which gets you into the debugger, then go to the source line of interest and do a Show Disassembly. You can do this even for optimized release builds (with debug info), but often the source doesn't quite match with the disassembly.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this