87 lines
2.8 KiB
C++
87 lines
2.8 KiB
C++
#include "debug_backend.h"
|
|
|
|
using namespace dbgui::backend;
|
|
|
|
Backend::~Backend() {}
|
|
|
|
void Backend::send_state_change(TargetState new_state, StateChangeReason reason,
|
|
uint64_t extra)
|
|
{
|
|
auto msg = std::make_unique<BackToFront::Msg>(
|
|
BackToFront::MsgType::state_change,
|
|
BackToFront::StateChange{new_state, reason, extra});
|
|
this->send_msg(std::move(msg));
|
|
}
|
|
|
|
void Backend::send_proc_info(BackToFront::InitialProcessInfo &&info)
|
|
{
|
|
auto msg = std::make_unique<BackToFront::Msg>(
|
|
BackToFront::MsgType::initial_proc_info, std::move(info));
|
|
this->send_msg(std::move(msg));
|
|
}
|
|
|
|
void Backend::send_reg_change(BackToFront::RegsChanged &&info)
|
|
{
|
|
auto msg = std::make_unique<BackToFront::Msg>(
|
|
BackToFront::MsgType::regs_changed, std::move(info));
|
|
this->send_msg(std::move(msg));
|
|
}
|
|
|
|
void Backend::send_thread_change(BackToFront::ThreadChange &&info)
|
|
{
|
|
auto msg = std::make_unique<BackToFront::Msg>(
|
|
BackToFront::MsgType::thread_changed, std::move(info));
|
|
this->send_msg(std::move(msg));
|
|
}
|
|
void Backend::send_thread_removed(BackToFront::ThreadRemoved &&info)
|
|
{
|
|
auto msg = std::make_unique<BackToFront::Msg>(
|
|
BackToFront::MsgType::thread_removed, std::move(info));
|
|
this->send_msg(std::move(msg));
|
|
}
|
|
|
|
void Backend::send_frame_changed(BackToFront::FrameChanged &&info)
|
|
{
|
|
auto msg = std::make_unique<BackToFront::Msg>(
|
|
BackToFront::MsgType::frame_changed, std::move(info));
|
|
this->send_msg(std::move(msg));
|
|
}
|
|
void Backend::send_frame_removed(BackToFront::FrameRemoved &&info)
|
|
{
|
|
auto msg = std::make_unique<BackToFront::Msg>(
|
|
BackToFront::MsgType::frame_removed, std::move(info));
|
|
this->send_msg(std::move(msg));
|
|
}
|
|
void Backend::send_data_result(BackToFront::DataResult &&info)
|
|
{
|
|
auto msg = std::make_unique<BackToFront::Msg>(
|
|
BackToFront::MsgType::data_result, std::move(info));
|
|
this->send_msg(std::move(msg));
|
|
}
|
|
void Backend::send_remove_data_node(uint16_t idx)
|
|
{
|
|
auto msg = std::make_unique<BackToFront::Msg>(
|
|
BackToFront::MsgType::remove_data_node,
|
|
std::move(BackToFront::RemoveDataNode{.node = idx}));
|
|
this->send_msg(std::move(msg));
|
|
}
|
|
void Backend::send_selected_thread_changed(uint16_t idx)
|
|
{
|
|
auto msg = std::make_unique<BackToFront::Msg>(
|
|
BackToFront::MsgType::selected_thread_changed,
|
|
BackToFront::SelectedThreadChanged{.idx = idx});
|
|
this->send_msg(std::move(msg));
|
|
}
|
|
void Backend::send_selected_frame_changed(uint16_t idx)
|
|
{
|
|
auto msg = std::make_unique<BackToFront::Msg>(
|
|
BackToFront::MsgType::selected_frame_changed,
|
|
BackToFront::SelectedFrameChanged{.idx = idx});
|
|
this->send_msg(std::move(msg));
|
|
}
|
|
void Backend::send_type_info(BackToFront::TypeInfo &&info)
|
|
{
|
|
auto msg = std::make_unique<BackToFront::Msg>(BackToFront::MsgType::type_info,
|
|
std::move(info));
|
|
this->send_msg(std::move(msg));
|
|
} |