mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
LibDebug: Pass read_from_stream
calls through read_value
instead
This commit is contained in:
parent
6972e98efa
commit
448b187782
Notes:
sideshowbarker
2024-07-18 02:47:59 +09:00
Author: https://github.com/timschumi Commit: https://github.com/SerenityOS/serenity/commit/448b187782 Pull-request: https://github.com/SerenityOS/serenity/pull/17094
@ -53,7 +53,7 @@ ErrorOr<void> DwarfInfo::populate_compilation_units()
|
|||||||
while (!debug_info_stream->is_eof()) {
|
while (!debug_info_stream->is_eof()) {
|
||||||
auto unit_offset = TRY(debug_info_stream->tell());
|
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.common.version <= 5);
|
||||||
VERIFY(compilation_unit_header.address_size() == sizeof(FlatPtr));
|
VERIFY(compilation_unit_header.address_size() == sizeof(FlatPtr));
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ LineProgram::LineProgram(DwarfInfo& dwarf_info, Core::Stream::SeekableStream& st
|
|||||||
|
|
||||||
ErrorOr<void> LineProgram::parse_unit_header()
|
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.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);
|
VERIFY(m_unit_header.opcode_base() <= sizeof(m_unit_header.std_opcode_lengths) / sizeof(m_unit_header.std_opcode_lengths[0]) + 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user