/* * Copyright (c) 2020-2021, Itamar S. * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include "CompilationUnit.h" #include #include #include namespace Debug::Dwarf { struct Range { FlatPtr start { 0 }; FlatPtr end { 0 }; }; class AddressRangesV5 { AK_MAKE_NONCOPYABLE(AddressRangesV5); AK_MAKE_NONMOVABLE(AddressRangesV5); public: // FIXME: This should be fine with using a non-owned stream. AddressRangesV5(NonnullOwnPtr range_lists_stream, CompilationUnit const& compilation_unit); ErrorOr for_each_range(Function); private: NonnullOwnPtr m_range_lists_stream; CompilationUnit const& m_compilation_unit; }; class AddressRangesV4 { AK_MAKE_NONCOPYABLE(AddressRangesV4); AK_MAKE_NONMOVABLE(AddressRangesV4); public: AddressRangesV4(NonnullOwnPtr ranges_stream, CompilationUnit const&); ErrorOr for_each_range(Function); private: NonnullOwnPtr m_ranges_stream; CompilationUnit const& m_compilation_unit; }; }