Skip to content

Commit edeb253

Browse files
committed
Addressed review comment
1 parent 845b1c5 commit edeb253

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ bool DWARFFormValue::ExtractValue(const DWARFDataExtractor &data,
7777
case DW_FORM_strp:
7878
case DW_FORM_line_strp:
7979
case DW_FORM_sec_offset:
80-
assert(m_unit); // Unit must be valid
80+
assert(m_unit);
8181
ref_addr_size = m_unit->GetFormParams().getDwarfOffsetByteSize();
8282
m_value.uval = data.GetMaxU64(offset_ptr, ref_addr_size);
8383
break;
@@ -284,7 +284,7 @@ bool DWARFFormValue::SkipValue(dw_form_t form,
284284
case DW_FORM_sec_offset:
285285
case DW_FORM_strp:
286286
case DW_FORM_line_strp:
287-
assert(unit); // Unit must be valid
287+
assert(unit);
288288
ref_addr_size = unit->GetFormParams().getDwarfOffsetByteSize();
289289
*offset_ptr += ref_addr_size;
290290
return true;

lldb/unittests/SymbolFile/DWARF/DWARF64UnitTest.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ TEST(DWARF64UnitTest, DWARF64DebugInfoAndCU) {
3838
Form: DW_FORM_data2
3939
- Attribute: DW_AT_stmt_list
4040
Form: DW_FORM_sec_offset
41-
- Attribute: DW_AT_low_pc
42-
Form: DW_FORM_addr
43-
- Attribute: DW_AT_high_pc
44-
Form: DW_FORM_data4
4541
- Code: 0x02
4642
Tag: DW_TAG_subprogram
4743
Children: DW_CHILDREN_no
@@ -59,8 +55,6 @@ TEST(DWARF64UnitTest, DWARF64DebugInfoAndCU) {
5955
- Value: 0x0
6056
- Value: 0x04
6157
- Value: 0x0
62-
- Value: 0xdeadbeef
63-
- Value: 0xdeadbeef
6458
- AbbrCode: 0x2
6559
Values:
6660
- Value: 0x1
@@ -84,10 +78,6 @@ TEST(DWARF64UnitTest, DWARF64DebugInfoAndCU) {
8478
auto attrs = cu_entry->GetAttributes(unit, DWARFDebugInfoEntry::Recurse::yes);
8579
attrs.ExtractFormValueAtIndex(2, form_value); // Validate DW_AT_stmt_list
8680
ASSERT_EQ(form_value.Unsigned(), 0UL);
87-
attrs.ExtractFormValueAtIndex(3, form_value); // Validate DW_AT_low_pc
88-
ASSERT_EQ(form_value.Unsigned(), 0xdeadbeef);
89-
attrs.ExtractFormValueAtIndex(4, form_value); // Validate DW_AT_high_pc
90-
ASSERT_EQ(form_value.Unsigned(), 0xdeadbeef);
9181

9282
DWARFDIE cu_die(unit, cu_entry);
9383
auto declaration = cu_die.GetFirstChild();

0 commit comments

Comments
 (0)