我如何可以查看C函数产生的汇编code? [英] How can i view assembly code produced for C functions?
本文介绍了我如何可以查看C函数产生的汇编code?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要查看某些C函数生成的汇编code,有什么标志编译C code当我应该使用?
I need to view the assembly code produced for certain C functions, what flags should i use when compiling the C code?
编辑:!使用G ++编译器,不好意思
Using the G++ Compiler, sorry!
推荐答案
您可以添加 -S
标签来看看大会code。
You may add the -S
tag to see the assembly code.
像文件 TEST.C
与 GCC
,这样做,
gcc TEST.c -S
铛
还输出装配code具有类似 -S
标记。
clang
also outputs the assembly code with a similar -S
tag.
之后,随便找了 .S
扩展名的文件。
After that just look for a file with a .S
extension.
这篇关于我如何可以查看C函数产生的汇编code?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文