mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:48:11 +00:00
HackStudio: Implement "Step Out" debugging action
The "Step Out" action continues execution until the current function returns. Also, LibDebug/StackFrameUtils was introduced to eliminate the duplication of stack frame inspection logic between the "Step Out" action and the BacktraceModel.
This commit is contained in:
parent
cb432ffe8c
commit
99788e6b32
8 changed files with 171 additions and 16 deletions
|
@ -50,17 +50,25 @@ void DebugInfoWidget::init_toolbar()
|
|||
pthread_mutex_unlock(Debugger::the().continue_mutex());
|
||||
});
|
||||
|
||||
m_singlestep_action = GUI::Action::create("Single Step", Gfx::Bitmap::load_from_file("/res/icons/16x16/debug-single-step.png"), [&](auto&) {
|
||||
m_singlestep_action = GUI::Action::create("Step Over", Gfx::Bitmap::load_from_file("/res/icons/16x16/debug-step-over.png"), [&](auto&) {
|
||||
pthread_mutex_lock(Debugger::the().continue_mutex());
|
||||
Debugger::the().set_continue_type(Debugger::ContinueType::SourceStepOver);
|
||||
pthread_cond_signal(Debugger::the().continue_cond());
|
||||
pthread_mutex_unlock(Debugger::the().continue_mutex());
|
||||
});
|
||||
|
||||
m_step_in_action = GUI::Action::create("Step In", Gfx::Bitmap::load_from_file("/res/icons/16x16/debug-step-in.png"), [&](auto&) {
|
||||
pthread_mutex_lock(Debugger::the().continue_mutex());
|
||||
Debugger::the().set_continue_type(Debugger::ContinueType::SourceSingleStep);
|
||||
pthread_cond_signal(Debugger::the().continue_cond());
|
||||
pthread_mutex_unlock(Debugger::the().continue_mutex());
|
||||
});
|
||||
|
||||
m_step_in_action = GUI::Action::create("Step In", Gfx::Bitmap::load_from_file("/res/icons/16x16/debug-step-in.png"), [&](auto&) {
|
||||
});
|
||||
|
||||
m_step_out_action = GUI::Action::create("Step Out", Gfx::Bitmap::load_from_file("/res/icons/16x16/debug-step-out.png"), [&](auto&) {
|
||||
pthread_mutex_lock(Debugger::the().continue_mutex());
|
||||
Debugger::the().set_continue_type(Debugger::ContinueType::SourceStepOut);
|
||||
pthread_cond_signal(Debugger::the().continue_cond());
|
||||
pthread_mutex_unlock(Debugger::the().continue_mutex());
|
||||
});
|
||||
|
||||
m_toolbar->add_action(*m_continue_action);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue