How to expand assembly names in Visual Studio?

Using Visual Studio 2010/2012, you can compile the C ++ source file using the /FAs switch to generate the assembly output of the resulting code. But the generated asm file contains all the characters in their distorted form.

Is there a switch or other smart way to get Visual Studio to generate unconnected characters? I know that you can manually submit the asm file through undname.exe , but the switch will be much more convenient than the custom post-build event.

+7
source share
2 answers

This is not possible due to the nature of the / FA output. FA displays a valid assembly code. The characters that need to be expressed, the C ++ functions that are not displayed, are simply invalid label names in the microsoft x86 assembly. There is also no good entry for anonymous namespaces.

Any output that handled these cases would not be compiled using assembler. If you made an assembler that handled such names, he would need to know whose rights-change rules apply to its assembly. This violates the main purpose of assembly output (to see EXACTLY what is happening).

+1
source

If all your characters are compatible with extern "C", than you could wrap all your code in a C ++ source file in an external "C" block to force all characters to appear in an unsigned C style, rather than having C ++, the name is applied mangling.

The Microsoft Research project http://en.wikipedia.org/wiki/Phoenix_%28compiler_framework%29 provides hooks in the toolchain, and this can allow direct control over how symbol names are formed, but, unfortunately, its last public release was for VS 2008, and it does not seem to have been created for inclusion in VS 2010 or VS 2012.

0
source

All Articles