mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-19 15:32:31 +00:00
HackStudio: Show a backtrace in the debug information tab
This commit is contained in:
parent
b9f0f402f4
commit
1fb62df02a
Notes:
sideshowbarker
2024-07-19 06:48:08 +09:00
Author: https://github.com/itamar8910
Commit: 1fb62df02a
Pull-request: https://github.com/SerenityOS/serenity/pull/2157
Reviewed-by: https://github.com/awesomekling
7 changed files with 152 additions and 9 deletions
|
@ -25,28 +25,31 @@
|
|||
*/
|
||||
|
||||
#include "DebugInfoWidget.h"
|
||||
#include "BacktraceModel.h"
|
||||
#include "Debugger.h"
|
||||
#include "VariablesModel.h"
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <LibGUI/BoxLayout.h>
|
||||
#include <LibGUI/ListView.h>
|
||||
#include <LibGUI/Model.h>
|
||||
#include <LibGUI/TableView.h>
|
||||
#include <LibGUI/Splitter.h>
|
||||
#include <LibGUI/TreeView.h>
|
||||
|
||||
DebugInfoWidget::DebugInfoWidget()
|
||||
{
|
||||
set_layout<GUI::HorizontalBoxLayout>();
|
||||
m_info_view = add<GUI::TreeView>();
|
||||
m_backtrace_view = add<GUI::TableView>();
|
||||
auto& splitter = add<GUI::HorizontalSplitter>();
|
||||
m_backtrace_view = splitter.add<GUI::ListView>();
|
||||
m_variables_view = splitter.add<GUI::TreeView>();
|
||||
}
|
||||
|
||||
void DebugInfoWidget::update_state(const PtraceRegisters& regs)
|
||||
{
|
||||
auto model = VariablesModel::create(regs);
|
||||
m_info_view->set_model(model);
|
||||
m_variables_view->set_model(VariablesModel::create(regs));
|
||||
m_backtrace_view->set_model(BacktraceModel::create(regs));
|
||||
}
|
||||
|
||||
void DebugInfoWidget::program_stopped()
|
||||
{
|
||||
m_info_view->set_model({});
|
||||
m_variables_view->set_model({});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue