diff options
author | Tim Schumacher <timschumi@gmx.de> | 2023-03-01 15:27:35 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-03-13 15:16:20 +0000 |
commit | a3f73e7d85584412e2774870bc6538faaaf71001 (patch) | |
tree | 0e16f061a39e5006ff311bcd93011fdd0a3816ba /Userland/Libraries/LibDebug/Dwarf | |
parent | d5871f5717579fab3c093537c44e3cd467560cdd (diff) | |
download | serenity-a3f73e7d85584412e2774870bc6538faaaf71001.zip |
AK: Rename Stream::read_entire_buffer to Stream::read_until_filled
No functional changes.
Diffstat (limited to 'Userland/Libraries/LibDebug/Dwarf')
-rw-r--r-- | Userland/Libraries/LibDebug/Dwarf/DwarfTypes.h | 6 | ||||
-rw-r--r-- | Userland/Libraries/LibDebug/Dwarf/LineProgram.h | 8 |
2 files changed, 7 insertions, 7 deletions
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<CompilationUnitHeader> 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<LineProgramUnitHeader32> 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; } }; |