如何知道编译器执行的每个阶段 [英] how to know each stage of compiler execution

查看:91
本文介绍了如何知道编译器执行的每个阶段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是cpp的新手。

当我调试程序时,是否可以看到执行的每个阶段?...



characater mapping ...



更确切地说,我可以看到下面链接中列出的每个执行阶段吗?< br $>


阶段翻译 [ ^ ]

I am new to cpp.
When I debug a program, is it possible to see each stages of its execution like ?...

characater mapping...

To be more precise, can I see each stage of executions listed in below link ?

Phases of Translation[^]

推荐答案

不!



您正在谈论的两项操作已完成在不同的时间:你的程序是在调试之前编译的(即使你使用的是JIT系统,在调试器到达任何地方之前编译该行)



它们是不同的过程,你不能做另一个过程。
No!

The two operations you are talking about are done at different times: you program is compiled before it is debugged (even if you are using a JIT system, the line is compiled before the debugger gets anywhere near it)

They are different processes and you can''t do one while the other occurs.


IMO,你不想看到它,它将主要是计算机生成ed bibberish。



调试普通用户代码时根本无法帮助你。



非常罕见的情况,为代码的一小部分代码生成汇编代码可能很有用,可以帮助调试在编译器优化做一些奇怪的事情时可能发生的特定问题。
IMO, you do not want to see that, it will be mostly computer generated gibberish.

It will not help you at all when debugging normal user code.

In some very rare instances, it might be useful to generate the assembly code for some very small portion of the code to help debug specific problems that might happen when compiler optimization do something weird.


也许不是什么你正在寻找,但这篇文章派上用场。这很酷:



使用Visual Studio进行10多种强大的调试技巧 [ ^ ]
Maybe not what you are looking for, but this Article Comes in handy. It''s cool:

10+ powerful debugging tricks with Visual Studio[^]


这篇关于如何知道编译器执行的每个阶段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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