regs and we can step into!

This commit is contained in:
T0b1
2023-06-02 02:06:49 +02:00
parent d4bf6731a3
commit ac3718b12b
17 changed files with 1434 additions and 344 deletions

View File

@@ -5,39 +5,47 @@
#include <optional>
#include <cstdint>
#include <memory>
#include <cstring>
#include "imgui.h"
#include "frontend/target.h"
#include "backend/debug_backend.h"
#include "frontend/window.h"
namespace dbgui::frontend {
namespace dbgui::frontend
{
struct Target {
backend::TargetState state = backend::TargetState::stopped;
std::string filename;
uint64_t id;
struct Frontend
{
Frontend()
{
_open_popup_name_buf.resize(512);
const char *str = "/home/klee/projects/dbgui/tmp/main";
std::memcpy(_open_popup_name_buf.data(), str, strlen(str) + 1);
}
std::unique_ptr<backend::Backend> backend = nullptr;
};
void run_frame();
struct Frontend {
Frontend() {
_open_popup_name_buf.resize(512);
}
std::optional<Target> target = {};
ImGuiID dock_id = 0;
uint64_t window_id = 0;
void run_frame();
private:
void draw_header();
void draw_open_popup();
void draw_status();
private:
void draw_header();
void draw_open_popup();
void draw_status();
void handle_msgs();
void handle_state_change(const BackToFront::StateChange &);
void handle_proc_info(BackToFront::InitialProcessInfo &&);
void handle_reg_change(const BackToFront::RegsChanged &);
bool _draw_second = false;
ImGuiID _dock_id = 0;
bool _draw_second = false;
bool _draw_open_popup = false;
ImGuiID _open_popup_id = 0;
std::vector<char> _open_popup_name_buf = {};
bool _draw_open_popup = false;
ImGuiID _open_popup_id = 0;
std::vector<char> _open_popup_name_buf = {};
std::optional<Target> _target = {};
};
}
std::vector<Window> _windows = {};
};
} // namespace dbgui::frontend