From a3f73e7d85584412e2774870bc6538faaaf71001 Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Wed, 1 Mar 2023 15:27:35 +0100 Subject: AK: Rename Stream::read_entire_buffer to Stream::read_until_filled No functional changes. --- Userland/Libraries/LibDebug/Dwarf/DwarfTypes.h | 6 +++--- Userland/Libraries/LibDebug/Dwarf/LineProgram.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'Userland/Libraries/LibDebug/Dwarf') diff --git a/Userland/Libraries/LibDebug/Dwarf/DwarfTypes.h b/Userland/Libraries/LibDebug/Dwarf/DwarfTypes.h index f429fd7229..bfdefaa39f 100644 --- a/Userland/Libraries/LibDebug/Dwarf/DwarfTypes.h +++ b/Userland/Libraries/LibDebug/Dwarf/DwarfTypes.h @@ -58,11 +58,11 @@ struct [[gnu::packed]] CompilationUnitHeader { static ErrorOr read_from_stream(Stream& stream) { CompilationUnitHeader header; - TRY(stream.read_entire_buffer(Bytes { &header.common, sizeof(header.common) })); + TRY(stream.read_until_filled(Bytes { &header.common, sizeof(header.common) })); if (header.common.version <= 4) - TRY(stream.read_entire_buffer(Bytes { &header.v4, sizeof(header.v4) })); + TRY(stream.read_until_filled(Bytes { &header.v4, sizeof(header.v4) })); else - TRY(stream.read_entire_buffer(Bytes { &header.v5, sizeof(header.v5) })); + TRY(stream.read_until_filled(Bytes { &header.v5, sizeof(header.v5) })); return header; } }; diff --git a/Userland/Libraries/LibDebug/Dwarf/LineProgram.h b/Userland/Libraries/LibDebug/Dwarf/LineProgram.h index bbf9f877ef..6d39799448 100644 --- a/Userland/Libraries/LibDebug/Dwarf/LineProgram.h +++ b/Userland/Libraries/LibDebug/Dwarf/LineProgram.h @@ -68,12 +68,12 @@ struct [[gnu::packed]] LineProgramUnitHeader32 { static ErrorOr read_from_stream(Stream& stream) { LineProgramUnitHeader32 header; - TRY(stream.read_entire_buffer(Bytes { &header.common, sizeof(header.common) })); + TRY(stream.read_until_filled(Bytes { &header.common, sizeof(header.common) })); if (header.common.version <= 4) - TRY(stream.read_entire_buffer(Bytes { &header.v4, sizeof(header.v4) })); + TRY(stream.read_until_filled(Bytes { &header.v4, sizeof(header.v4) })); else - TRY(stream.read_entire_buffer(Bytes { &header.v5, sizeof(header.v5) })); - TRY(stream.read_entire_buffer(Bytes { &header.std_opcode_lengths, min(sizeof(header.std_opcode_lengths), (header.opcode_base() - 1) * sizeof(header.std_opcode_lengths[0])) })); + TRY(stream.read_until_filled(Bytes { &header.v5, sizeof(header.v5) })); + TRY(stream.read_until_filled(Bytes { &header.std_opcode_lengths, min(sizeof(header.std_opcode_lengths), (header.opcode_base() - 1) * sizeof(header.std_opcode_lengths[0])) })); return header; } }; -- cgit v1.2.3