VC advanced usage)

Source: Internet
Author: User
The second method of advanced use of VC -- the C code obtains the corresponding assembly code

Add the/FA option in the attachment to generate the corresponding assembly code. asm file in the compiled debug folder.

Related parameter settings:

/FA[c|s|u]
/Fapathname

Remarks

Parameters Control the generation of source code and machine code and the extension of the list file.

The following table describes/FA. Optional/FASpecify multiple values. For example, you can specify/FAsu.

Option List content and file extension

/FA

Assembly Code;. asm

/FAc

Machine code and assembly code;. cod

/FAs

Source code and assembly code;. asm

If/FACS, The file extension name is. cod.

/FAU

Causes an output file to be created with a UTF-8 format and byte sequence mark. By default, the file is encoded as ANSI, but if you want the inventory file to be correctly displayed in all systems, or if you want to use the Unicode source code file as the compiler input, use/FAU.

If/FasuAnd the source code file uses Unicode encoding other than the UTF-8, the code lines in the. asm file may not be correctly displayed.

By default, the configuration file obtains the same base name as the source file. Use/FaYou can change the name of the configuration file and the directory in which the configuration file is created.

/Fa usage Result

/FA

CreateSource_file. Asm.

/FA Filename

SetFilenamePut. asm in the current directory. Valid only when compiling a single source code file.

/FA Filename. Extension

SetFilename. ExtensionPut it in the current directory. Valid only when compiling a single source code file.

/FA Directory\

CreateSource_file. Asm, and put it in the specifiedDirectory. Note that there must be a suffix backslash. Only the path on the current disk can be used.

/FA Directory\Filename

SetFilename. Asm is placed in the specified directory. Valid only when compiling a single source code file.

/FA Directory\Filename. Extension

SetFilename. ExtensionPut it in the specified directory. Valid only when compiling a single source code file.

Setting Method

1139 views | 2 comments

  • Reply

    Vfdff Of course, you can also use the command:
    The following command line generates a list of combined source code and machine code named HELLO. cod:
    CL/FAcs HELLO. CPP

  • Reply

    You can view the Assembly Code directly when debugging vfdff, but the resulting code has less comments. The ideal method is to use the option/FAs of the VC compiler to generate the corresponding assembly code. /FAs will also add annotations to the assembly code and the correspondence between C ++ code, which is very helpful for analysis. Build code can find the corresponding. ASM file in the output directory.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.