mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:44:58 +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
|
@ -70,7 +70,7 @@ static void print_syscall(PtraceRegisters& regs, size_t depth)
|
|||
static NonnullOwnPtr<HashMap<void*, X86::Instruction>> instrument_code()
|
||||
{
|
||||
auto instrumented = make<HashMap<void*, X86::Instruction>>();
|
||||
g_debug_session->for_each_loaded_library([&](const Debug::DebugSession::LoadedLibrary& lib) {
|
||||
g_debug_session->for_each_loaded_library([&](const Debug::LoadedLibrary& lib) {
|
||||
lib.debug_info->elf().for_each_section_of_type(SHT_PROGBITS, [&](const ELF::Image::Section& section) {
|
||||
if (section.name() != ".text")
|
||||
return IterationDecision::Continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue