Преглед на файлове

LibDebug: Pass `read_from_stream` calls through `read_value` instead

Tim Schumacher преди 2 години
родител
ревизия
448b187782
променени са 2 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 1 1
      Userland/Libraries/LibDebug/Dwarf/DwarfInfo.cpp
  2. 1 1
      Userland/Libraries/LibDebug/Dwarf/LineProgram.cpp

+ 1 - 1
Userland/Libraries/LibDebug/Dwarf/DwarfInfo.cpp

@@ -53,7 +53,7 @@ ErrorOr<void> DwarfInfo::populate_compilation_units()
     while (!debug_info_stream->is_eof()) {
         auto unit_offset = TRY(debug_info_stream->tell());
 
-        auto compilation_unit_header = TRY(CompilationUnitHeader::read_from_stream(*debug_info_stream));
+        auto compilation_unit_header = TRY(debug_info_stream->read_value<CompilationUnitHeader>());
         VERIFY(compilation_unit_header.common.version <= 5);
         VERIFY(compilation_unit_header.address_size() == sizeof(FlatPtr));
 

+ 1 - 1
Userland/Libraries/LibDebug/Dwarf/LineProgram.cpp

@@ -27,7 +27,7 @@ LineProgram::LineProgram(DwarfInfo& dwarf_info, Core::Stream::SeekableStream& st
 
 ErrorOr<void> LineProgram::parse_unit_header()
 {
-    m_unit_header = TRY(LineProgramUnitHeader32::read_from_stream(m_stream));
+    m_unit_header = TRY(m_stream.read_value<LineProgramUnitHeader32>());
 
     VERIFY(m_unit_header.version() >= MIN_DWARF_VERSION && m_unit_header.version() <= MAX_DWARF_VERSION);
     VERIFY(m_unit_header.opcode_base() <= sizeof(m_unit_header.std_opcode_lengths) / sizeof(m_unit_header.std_opcode_lengths[0]) + 1);