Gcc 4.8矮人4 vs矮人2

时间:2021-09-08 02:29:46

GCC 4.8 supports DWARF4. I'm wondering what is the difference between DWARF4 and DWARF2 from user point of view.

GCC 4.8支持矮人4。我想知道从用户的角度来看矮人4和矮人2有什么区别。

Lets look at it from GDB point of view. Is there any difference for users when you switch to DWARF4?

让我们从GDB的角度来看。切换到矮人4对用户有什么不同吗?

I have found a Dwarf Home Page, but as far as i can see there is nowhere on the web information about difference from user POV.

我找到了一个矮化的主页,但是就我所见,web上没有关于用户POV的任何不同的信息。

Can you point me those differencies?

你能告诉我那些不同吗?

3 个解决方案

#1


5  

The first version of DWARF proved to use excessive amounts of storage, DWARF-2, superseded it and added various encoding schemes to reduce data size, later on Version 4 of DWARF, which offers improved data compression, better description of optimized code, and support for new language features in C++.

DWARF的第一个版本被证明使用了过多的存储,即DWARF-2,它取代了DWARF,并添加了各种编码方案来减少数据大小。

Usually release notes of or anouncement summarize these differences (there would be many more)

通常发布注释或声明总结这些差异(会有更多)

http://dwarfstd.org/Announcement.php

http://dwarfstd.org/Announcement.php

http://dwarfstd.org/PressRelease.php

http://dwarfstd.org/PressRelease.php

#2


3  

The Dwarf 4 standard page lists major enhancements, the spec lists these in more detail.

Dwarf 4标准页面列出了主要的改进,规范详细列出了这些改进。

The bottom line for most users seems to be better support for optimized code, support for more languages (mostly in Dwarf 3), and support for new C++ language constructs

大多数用户的底线似乎是更好地支持优化的代码,支持更多的语言(大部分在Dwarf 3中),以及支持新的c++语言结构

#3


1  

I would like to add that not all versions of gdb can properly read dwarf4. I often find myself to compile with -gdwarf-2 just to be able to see all the symbols. For instance, with gdb 7.2 I can't read all symbols in a mixed Fortran-C build if I use dwarf4, while I can with dwarf2.

我想补充一点,并不是所有版本的gdb都可以正确地读取dwarf f4。我经常使用- g矮人-2来编译,只是为了能够看到所有的符号。例如,在gdb 7.2中,如果使用矮人4,我不能读取混合Fortran-C构建中的所有符号,而使用矮人2则可以。

#1


5  

The first version of DWARF proved to use excessive amounts of storage, DWARF-2, superseded it and added various encoding schemes to reduce data size, later on Version 4 of DWARF, which offers improved data compression, better description of optimized code, and support for new language features in C++.

DWARF的第一个版本被证明使用了过多的存储,即DWARF-2,它取代了DWARF,并添加了各种编码方案来减少数据大小。

Usually release notes of or anouncement summarize these differences (there would be many more)

通常发布注释或声明总结这些差异(会有更多)

http://dwarfstd.org/Announcement.php

http://dwarfstd.org/Announcement.php

http://dwarfstd.org/PressRelease.php

http://dwarfstd.org/PressRelease.php

#2


3  

The Dwarf 4 standard page lists major enhancements, the spec lists these in more detail.

Dwarf 4标准页面列出了主要的改进,规范详细列出了这些改进。

The bottom line for most users seems to be better support for optimized code, support for more languages (mostly in Dwarf 3), and support for new C++ language constructs

大多数用户的底线似乎是更好地支持优化的代码,支持更多的语言(大部分在Dwarf 3中),以及支持新的c++语言结构

#3


1  

I would like to add that not all versions of gdb can properly read dwarf4. I often find myself to compile with -gdwarf-2 just to be able to see all the symbols. For instance, with gdb 7.2 I can't read all symbols in a mixed Fortran-C build if I use dwarf4, while I can with dwarf2.

我想补充一点,并不是所有版本的gdb都可以正确地读取dwarf f4。我经常使用- g矮人-2来编译,只是为了能够看到所有的符号。例如,在gdb 7.2中,如果使用矮人4,我不能读取混合Fortran-C构建中的所有符号,而使用矮人2则可以。