mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 20:45:06 +00:00
HackStudio: Make debugger support shared libraries
This commit is contained in:
parent
dcdb68a013
commit
94db04fc12
7 changed files with 55 additions and 21 deletions
|
@ -522,14 +522,16 @@ NonnullRefPtr<GUI::Action> HackStudioWidget::create_debug_action()
|
|||
void HackStudioWidget::initialize_debugger()
|
||||
{
|
||||
Debugger::initialize(
|
||||
m_project->root_path(),
|
||||
[this](const PtraceRegisters& regs) {
|
||||
ASSERT(Debugger::the().session());
|
||||
const auto& debug_session = *Debugger::the().session();
|
||||
auto source_position = debug_session.debug_info().get_source_position(regs.eip);
|
||||
auto source_position = debug_session.get_source_position(regs.eip);
|
||||
if (!source_position.has_value()) {
|
||||
dbgln("Could not find source position for address: {:p}", regs.eip);
|
||||
return Debugger::HasControlPassedToUser::No;
|
||||
}
|
||||
dbgln("Debugger stopped at source position: {}:{}", source_position.value().file_path, source_position.value().line_number);
|
||||
|
||||
Core::EventLoop::main().post_event(
|
||||
*window(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue