1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:38:11 +00:00

HackStudio: Enable building HackStudio on x86_64

This implements bits and pieces to get the debugging functionality to
build. No testing has been done to check whether it actually works
because GCC doesn't currently work.
This commit is contained in:
Gunnar Beutner 2021-08-02 00:07:23 +02:00 committed by Andreas Kling
parent fb099ad38b
commit b81926d933
14 changed files with 110 additions and 29 deletions

View file

@ -684,9 +684,9 @@ void HackStudioWidget::initialize_debugger()
[this](const PtraceRegisters& regs) {
VERIFY(Debugger::the().session());
const auto& debug_session = *Debugger::the().session();
auto source_position = debug_session.get_source_position(regs.eip);
auto source_position = debug_session.get_source_position(regs.ip());
if (!source_position.has_value()) {
dbgln("Could not find source position for address: {:p}", regs.eip);
dbgln("Could not find source position for address: {:p}", regs.ip());
return Debugger::HasControlPassedToUser::No;
}
dbgln("Debugger stopped at source position: {}:{}", source_position.value().file_path, source_position.value().line_number);