什么是“有限的调试信息”? (完整的“调试信息”生成巨大的EXE文件) [英] What is 'Limited Debug Information'? (Full “Debugging Information" generates huge EXE files)

查看:184
本文介绍了什么是“有限的调试信息”? (完整的“调试信息”生成巨大的EXE文件)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近安装了Delphi XE7。当我第一次编译一个旧应用程序时,当我看到EXE的大小增加了10MB时,我的下巴下降了。



在项目选项中,我发现设置调试信息到有限的调试信息将EXE大小减少到非常接近由Delphi XE生成的EXE。
也许在Delphi XE7的有限调试信息下,相当于来自Delphi XE的调试信息,因为它产生了相同的EXE大小?



为什么调试信息使EXE如此之大(与XE相比)?我无法使用有限的信息编译EXE(我猜),因为我想要完全访问调试的好东西(也是EurekaLog需要它)。

Embarcadero的文档对限制和全部调试信息。



EurekaLog文档是一个旧版本的Delphi,所以它不清楚说明我是否可以使用新的选项(仁慈的)'有限的调试信息'或完整的调试信息。我将不得不尝试。

解决方案

有限的调试信息是一个只影响Android定位编译器的选项。但是,由于所有编译器共享相同的界面,所以每个目标都会显示此选项。它仅适用于每个单独对象(.o)文件中有多少调试信息。对于Android(和iOS),调试信息格式为DWARF。 DWARF是一种非常详细的格式,可以包含关于给定单位的所有类型的所有类型的详细结构类型信息,其中包含给定单位使用的所有单元的所有类型的。在有限的调试信息下,所有已使用单元的类型信息是生成。这可能意味着一些字段和局部变量在调试时可能无法检查。



关于调试信息是否包含在最终可执行文件中,由链接器选项控制,不是通过编译器选项。链接器将链接可用的任何调试信息。如果Android的建立和调试信息被选中,那么最终的图像将会有更多的信息,而且要大得多。



现在我假设你是针对Windows(您实际上并没有说明您的意思,但我将在此使用我的精神力量),在这种情况下,有限的调试信息和调试信息是相同的。在Windows下,调试格式称为GIANT。你能说讽刺吗? DWARF是一种非常详细的格式,而Embarcadero(Borland最初)拥有GIANT格式更为紧凑。大小的增加只能来自增加的运行时功能,可能来自更多的泛型。


I installed Delphi XE7 recently. When I first compiled an old app my jaw dropped when I have seen that the size of the EXE increased with 10MB!

Playing in the 'Project options' I discovered that setting the 'Debug information' to 'Limited Debug Information' decreases the EXE size to something VERY close to the EXE generated by Delphi XE. Maybe under Delphi XE7 'Limited Debug Information' is the equivalent of 'Debug Information' from Delphi XE since it results in the same EXE size?

So, why full 'Debug information' makes the EXE so big (compared to XE)? I cannot compile the EXE with limited info (I guess) because I want to have full access to the debugging goodies (also EurekaLog needs it).
Embarcadero's documentation says nothing about the difference between 'limited' and full debug info.

EurekaLog documentation is for an old version of Delphi so it doesn't clearly states if I can use the new option (merciful) 'Limited debug info' or the full debug info. I will have to experiment.

解决方案

"Limited Debug Information" is an option that only affects the Android targeting compiler. However, since all the compilers share the same interface, this option appears for every target. It only applies to how much debug information goes into each individual object (.o) file. For Android (and iOS), the debug info format is DWARF. DWARF is a very verbose format and can contain highly detailed structural type information about all the types in a given unit and for all the types from all the units "used" by a given unit. Under "Limited Debug Information", the type information for all the used units is not generated. This can mean some field and local variables may not be inspectable while debugging.

As for whether debug information is included into the final executable, that is controlled by the linker option, not by the compiler option. The linker will link whatever debug information is available. If building for Android and "Debug Information" is selected, then the final image will have much more information and be much larger.

Now I am going to presume you're targeting Windows (you don't actually state that you are, but I'll use my psychic powers here), in which case, "Limited Debug Information" and "Debug Information" are the same thing. Under Windows, the debug format is called, "GIANT". Can you say "irony"? DWARF is an extremely verbose format, while Embarcadero's (Borland's originally) own GIANT format is more compact. The increase in size can only be from added run-time functionality and probably from more use of generics.

这篇关于什么是“有限的调试信息”? (完整的“调试信息”生成巨大的EXE文件)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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