简体   繁体   English

什么是'有限的调试信息'? (完整的“调试信息”生成巨大的EXE文件)

[英]What is 'Limited Debug Information'? (Full “Debugging Information" generates huge EXE files)

I installed Delphi XE7 recently. 我最近安装了Delphi XE7。 When I first compiled an old app my jaw dropped when I have seen that the size of the EXE increased with 10MB! 当我第一次编译一个旧应用程序时,当我看到EXE的大小增加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. 在'项目选项'中玩,我发现将'调试信息'设置为'有限调试信息'会将EXE大小减小到非常接近Delphi XE生成的EXE。 Maybe under Delphi XE7 'Limited Debug Information' is the equivalent of 'Debug Information' from Delphi XE since it results in the same EXE size? 也许在Delphi下,XE7'有限调试信息'相当于Delphi XE的'Debug Information',因为它产生相同的EXE大小?

So, why full 'Debug information' makes the EXE so big (compared to XE)? 那么,为什么完整的“调试信息”使得EXE如此之大(与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). 我无法用有限的信息编译EXE(我猜)因为我想完全访问调试好东西(EurekaLog也需要它)。
Embarcadero's documentation says nothing about the difference between 'limited' and full debug info. Embarcadero的文档没有说明“有限”和完整调试信息之间的区别。

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. EurekaLog文档适用于旧版本的Delphi,因此它没有明确说明我是否可以使用新选项(merciful)'有限调试信息'或完整的调试信息。 I will have to experiment. 我将不得不进行实验。

"Limited Debug Information" is an option that only affects the Android targeting compiler. “有限调试信息”是仅影响Android目标编译器的选项。 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. 它仅适用于每个单个对象(.o)文件中的调试信息量。 For Android (and iOS), the debug info format is DWARF. 对于Android(和iOS),调试信息格式为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. DWARF是一种非常详细的格式,可以包含有关给定单元中所有类型的高度详细的结构类型信息, 以及来自给定单元“使用”的所有单元的所有类型。 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. 如果选择Android版本和“调试信息”,则最终图像将具有更多信息并且更大。

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. 现在我假设你的目标是Windows(你实际上并没有说明你是,但我会在这里使用我的通灵能力),在这种情况下,“有限调试信息”和“调试信息”是相同的事情。 Under Windows, the debug format is called, "GIANT". 在Windows下,调试格式称为“GIANT”。 Can you say "irony"? 你能说“讽刺”吗? DWARF is an extremely verbose format, while Embarcadero's (Borland's originally) own GIANT format is more compact. DWARF是一种非常冗长的格式,而Embarcadero(Borland最初)拥有的GIANT格式更加紧凑。 The increase in size can only be from added run-time functionality and probably from more use of generics. 大小的增加只能来自增加的运行时功能,可能来自更多的泛型使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Delphi XE5编译设置中的“有限调试信息”和“调试信息”有什么区别 - What is the difference between “Limited Debugging Information” and “Debug Information” in Delphi XE5 compiling setting 防止枚举类型数组的调试信息出现在 EXE 中 - Prevent debug information for array of enumerated type from appearing in EXE 调试信息 {$D+} 将我的 EXE 的大小增加了 6MB - Debug information {$D+} increases the size of my EXE with 6MB 编译器和链接器调试信息之间有什么区别? - What's the difference between compiler and linker debug information? 调试混合的Delphi(本机)和C#代码,获得“二进制是在没有调试信息的情况下构建的” - Debugging mixed Delphi (native) and C# code, getting “binary was built without debug information” 将完整的控制台信息移至TMemo - Moving full Console information to TMemo 列出 Delphi 中一个巨大目录中的所有 exe 文件的最快方法是什么? - What's the fastest way to list all the exe files in a huge directory in Delphi? delphi 7生成的MB文件是什么? - What are the MB files that delphi 7 generates? 编译时修改EXE中的版本信息 - Modify version information in EXE at compile time 如何解决“二进制不是由调试信息构建的”? - How to get around “Binary was not built with debug information”?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM