@@ -435,8 +435,8 @@ void cu_header::read(freader& s, bool needs_byteswap) {
435
435
_version = read_pod<std::uint16_t >(s, needs_byteswap);
436
436
437
437
if (_version == 2 ) {
438
- // Do nothing...? This version is so old, I'm not sure
439
- // what we should be doing with it.. .
438
+ // Do nothing. DWARF2 has been found in some cases
439
+ // and the current implementation seems to suffice .
440
440
} else if (_version == 4 ) {
441
441
// Do nothing. We started this project with DWARF4
442
442
// so the baseline implementation should match that.
@@ -446,7 +446,7 @@ void cu_header::read(freader& s, bool needs_byteswap) {
446
446
// it until it is necessary to do so.
447
447
_unit_type = read_pod<std::uint8_t >(s, needs_byteswap);
448
448
} else {
449
- throw std::runtime_error ( " unknown DWARF version: " + std::to_string (_version) );
449
+ ADOBE_INVARIANT (! " unhandled DWARF compilation unit " );
450
450
}
451
451
452
452
// note the read_pod types differ.
@@ -514,9 +514,11 @@ void line_header::read(freader& s, bool needs_byteswap) {
514
514
}
515
515
_version = read_pod<std::uint16_t >(s, needs_byteswap);
516
516
if (_version == 2 ) {
517
- /* do nothing */
517
+ // Do nothing. DWARF2 has been found in some cases
518
+ // and the current implementation seems to suffice.
518
519
} else if (_version == 4 ) {
519
- /* do nothing */
520
+ // Do nothing. We started this project with DWARF4
521
+ // so the baseline implementation should match that.
520
522
} else if (_version == 5 ) {
521
523
// SPECREF: DWARF5 page 26 (8) line 11 -- changes from DWARF4 to DWARF5
522
524
@@ -526,7 +528,7 @@ void line_header::read(freader& s, bool needs_byteswap) {
526
528
// SPECREF: DWARF5 page 172 (154) line 16
527
529
_segment_selector_size = read_pod<std::int8_t >(s, needs_byteswap);
528
530
} else {
529
- throw std::runtime_error ( " unhandled DWARF version ( " + std::to_string (_version) + " ) " );
531
+ ADOBE_INVARIANT (! " unhandled DWARF line header " );
530
532
}
531
533
_header_length = read_pod<std::uint32_t >(s, needs_byteswap);
532
534
_min_instruction_length = read_pod<std::uint8_t >(s);
@@ -660,7 +662,6 @@ bool skip_tagged_die(const die& d) {
660
662
dw::tag::variable,
661
663
dw::tag::formal_parameter,
662
664
dw::tag::template_type_parameter,
663
- dw::tag::subprogram,
664
665
};
665
666
static const auto first = std::begin (skip_tags);
666
667
static const auto last = std::end (skip_tags);
@@ -1224,6 +1225,8 @@ pool_string dwarf::implementation::die_identifier(const die& d,
1224
1225
// clang-format off
1225
1226
const dw::at string_attributes[] = {
1226
1227
dw::at::linkage_name,
1228
+ dw::at::mips_linkage_name,
1229
+ dw::at::hp_linkage_name,
1227
1230
dw::at::specification,
1228
1231
dw::at::name, // REVISIT (fosterbrereton): remove?
1229
1232
dw::at::type, // REVISIT (fosterbrereton): remove?
0 commit comments