mirror of
https://github.com/RGBCube/serenity
synced 2025-07-02 23:52:07 +00:00
LibDebug: Add ProcessInspector base class
ProcessInspector is an abstract base class for an object that can inspect the address space of a process. Concrete sub classes need to implement methods for peeking & poking memory and walking the loaded libraries. It is currently only implemented by DebugSession.
This commit is contained in:
parent
38ddf301f6
commit
7950f5cb51
7 changed files with 173 additions and 118 deletions
32
Userland/Libraries/LibDebug/LoadedLibrary.h
Normal file
32
Userland/Libraries/LibDebug/LoadedLibrary.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Itamar S. <itamar8910@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "DebugInfo.h"
|
||||
#include <AK/MappedFile.h>
|
||||
#include <AK/Types.h>
|
||||
#include <LibELF/Image.h>
|
||||
|
||||
namespace Debug {
|
||||
struct LoadedLibrary {
|
||||
String name;
|
||||
NonnullRefPtr<MappedFile> file;
|
||||
NonnullOwnPtr<ELF::Image> image;
|
||||
NonnullOwnPtr<DebugInfo> debug_info;
|
||||
FlatPtr base_address {};
|
||||
|
||||
LoadedLibrary(String const& name, NonnullRefPtr<MappedFile> file, NonnullOwnPtr<ELF::Image> image, NonnullOwnPtr<DebugInfo>&& debug_info, FlatPtr base_address)
|
||||
: name(name)
|
||||
, file(move(file))
|
||||
, image(move(image))
|
||||
, debug_info(move(debug_info))
|
||||
, base_address(base_address)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue