1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 11:17:44 +00:00

LibDebug: Propagate errors around LineProgram

Found while playing Fixme-Roulette.
This commit is contained in:
Ben Wiederhake 2023-05-12 00:23:31 +02:00 committed by Andreas Kling
parent 4093952a6e
commit c5d3de3f7d
3 changed files with 18 additions and 8 deletions

View file

@ -7,6 +7,7 @@
#pragma once
#include <AK/DeprecatedFlyString.h>
#include <AK/NonnullOwnPtr.h>
#include <AK/Vector.h>
#include <LibDebug/Dwarf/DwarfTypes.h>
@ -108,7 +109,7 @@ class LineProgram {
AK_MAKE_NONMOVABLE(LineProgram);
public:
explicit LineProgram(DwarfInfo& dwarf_info, SeekableStream& stream);
static ErrorOr<NonnullOwnPtr<LineProgram>> create(DwarfInfo& dwarf_info, SeekableStream& stream);
struct LineInfo {
FlatPtr address { 0 };
@ -133,6 +134,8 @@ public:
bool looks_like_embedded_resource() const;
private:
LineProgram(DwarfInfo& dwarf_info, SeekableStream& stream, size_t unit_offset);
ErrorOr<void> parse_unit_header();
ErrorOr<void> parse_source_directories();
ErrorOr<void> parse_source_files();