mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:27:45 +00:00
LibDebug: Parse DWARF address ranges using Core::Stream
This commit is contained in:
parent
908b88db34
commit
e235c42e4d
3 changed files with 56 additions and 50 deletions
|
@ -11,6 +11,7 @@
|
|||
#include <AK/Function.h>
|
||||
#include <AK/MemoryStream.h>
|
||||
#include <AK/Noncopyable.h>
|
||||
#include <LibCore/Stream.h>
|
||||
|
||||
namespace Debug::Dwarf {
|
||||
|
||||
|
@ -24,12 +25,12 @@ class AddressRangesV5 {
|
|||
AK_MAKE_NONMOVABLE(AddressRangesV5);
|
||||
|
||||
public:
|
||||
AddressRangesV5(ReadonlyBytes range_lists_data, size_t offset, CompilationUnit const& compilation_unit);
|
||||
AddressRangesV5(NonnullOwnPtr<Core::Stream::Stream> range_lists_stream, CompilationUnit const& compilation_unit);
|
||||
|
||||
void for_each_range(Function<void(Range)>);
|
||||
ErrorOr<void> for_each_range(Function<void(Range)>);
|
||||
|
||||
private:
|
||||
InputMemoryStream m_range_lists_stream;
|
||||
NonnullOwnPtr<Core::Stream::Stream> m_range_lists_stream;
|
||||
CompilationUnit const& m_compilation_unit;
|
||||
};
|
||||
|
||||
|
@ -38,12 +39,12 @@ class AddressRangesV4 {
|
|||
AK_MAKE_NONMOVABLE(AddressRangesV4);
|
||||
|
||||
public:
|
||||
AddressRangesV4(ReadonlyBytes ranges_data, size_t offset, CompilationUnit const&);
|
||||
AddressRangesV4(NonnullOwnPtr<Core::Stream::Stream> ranges_stream, CompilationUnit const&);
|
||||
|
||||
void for_each_range(Function<void(Range)>);
|
||||
ErrorOr<void> for_each_range(Function<void(Range)>);
|
||||
|
||||
private:
|
||||
InputMemoryStream m_ranges_stream;
|
||||
NonnullOwnPtr<Core::Stream::Stream> m_ranges_stream;
|
||||
CompilationUnit const& m_compilation_unit;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue