铿锵交错的源代码与汇编 [英] clang interleaved source and assembly

查看:183
本文介绍了铿锵交错的源代码与汇编的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

想知道如果它是能够生成交错的源和组件从铛?
我要寻找到GCC命令等价的东西(截至的http://www.fclose.com/240/generate-a-mixed-source-and-assembly-listing-using-gcc/)

Wondering if it is possible to generate interleaved source and assembly from clang? I am looking for something equivalent to gcc command (as demonstrated at http://www.fclose.com/240/generate-a-mixed-source-and-assembly-listing-using-gcc/)

gcc -Wa,-adhln -g source_code.c > assembly_list.s

我已经访问过的链接:<一个href=\"http://stackoverflow.com/questions/137038/how-do-you-get-assembler-output-from-c-c-source-in-gcc\">How你得到的C / C ++的GCC源汇编输出但它竟然列出组装得到 - ?但没有交错

I have visited Link: How do you get assembler output from C/C++ source in gcc? but it gets so far as to list the assembly - but no interleaving.

另外的Visual Studio确实给你pretty不错交错汇编输出,详情点击这里:<一href=\"http://stackoverflow.com/questions/1020498/how-to-view-the-assembly-behind-the-$c$c-using-visual-c\">How使用Visual C查看code后面的装配++?

Also Visual Studio does give you pretty nice interleaved assembly output, details here: How to view the assembly behind the code using Visual C++?

感谢您的所有帮助。

萨朗

推荐答案

似乎有一个bug报告有时在去年指出正是这个:的 http://llvm.org/bugs/show_bug.cgi?id=16647

There seems to be a bug reported sometimes last year stating exactly this: http://llvm.org/bugs/show_bug.cgi?id=16647

Bug 16647 - No option to produce mixed source + assembly listing?

所以,因为它仍然是我猜铛没有这个支持呢。

So since it is still NEW I guess clang does not have this supported yet.

作为替代方案,如何编译code,然后用 objdump的-S​​ ?输出格式有点类似...

As an alternative, how about compiling your code and then use objdump -S ? The output format is somewhat similar ...

这篇关于铿锵交错的源代码与汇编的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆