diff options
Diffstat (limited to 'Userland/Libraries/LibDebug/Dwarf/AbbreviationsMap.cpp')
-rw-r--r-- | Userland/Libraries/LibDebug/Dwarf/AbbreviationsMap.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Userland/Libraries/LibDebug/Dwarf/AbbreviationsMap.cpp b/Userland/Libraries/LibDebug/Dwarf/AbbreviationsMap.cpp index e8c263ffa6..67f926a43e 100644 --- a/Userland/Libraries/LibDebug/Dwarf/AbbreviationsMap.cpp +++ b/Userland/Libraries/LibDebug/Dwarf/AbbreviationsMap.cpp @@ -21,19 +21,19 @@ AbbreviationsMap::AbbreviationsMap(DwarfInfo const& dwarf_info, u32 offset) ErrorOr<void> AbbreviationsMap::populate_map() { - auto abbreviation_stream = TRY(FixedMemoryStream::construct(m_dwarf_info.abbreviation_data())); - TRY(abbreviation_stream->discard(m_offset)); + FixedMemoryStream abbreviation_stream { m_dwarf_info.abbreviation_data() }; + TRY(abbreviation_stream.discard(m_offset)); - while (!abbreviation_stream->is_eof()) { - size_t abbreviation_code = TRY(abbreviation_stream->read_value<LEB128<size_t>>()); + while (!abbreviation_stream.is_eof()) { + size_t abbreviation_code = TRY(abbreviation_stream.read_value<LEB128<size_t>>()); // An abbreviation code of 0 marks the end of the // abbreviations for a given compilation unit if (abbreviation_code == 0) break; - size_t tag = TRY(abbreviation_stream->read_value<LEB128<size_t>>()); + size_t tag = TRY(abbreviation_stream.read_value<LEB128<size_t>>()); - auto has_children = TRY(abbreviation_stream->read_value<u8>()); + auto has_children = TRY(abbreviation_stream.read_value<u8>()); AbbreviationEntry abbreviation_entry {}; abbreviation_entry.tag = static_cast<EntryTag>(tag); @@ -41,14 +41,14 @@ ErrorOr<void> AbbreviationsMap::populate_map() AttributeSpecification current_attribute_specification {}; do { - size_t attribute_value = TRY(abbreviation_stream->read_value<LEB128<size_t>>()); - size_t form_value = TRY(abbreviation_stream->read_value<LEB128<size_t>>()); + size_t attribute_value = TRY(abbreviation_stream.read_value<LEB128<size_t>>()); + size_t form_value = TRY(abbreviation_stream.read_value<LEB128<size_t>>()); current_attribute_specification.attribute = static_cast<Attribute>(attribute_value); current_attribute_specification.form = static_cast<AttributeDataForm>(form_value); if (current_attribute_specification.form == AttributeDataForm::ImplicitConst) { - ssize_t data_value = TRY(abbreviation_stream->read_value<LEB128<ssize_t>>()); + ssize_t data_value = TRY(abbreviation_stream.read_value<LEB128<ssize_t>>()); current_attribute_specification.value = data_value; } |