From 352fd47e7b1f4607ab0e42216465521e6bd12023 Mon Sep 17 00:00:00 2001 From: Vladimir Kononovich Date: Wed, 28 Feb 2024 01:00:16 +0300 Subject: [PATCH] Implemented IDA native conditional breakpoints. --- .gitignore | 1 + Gens/gens.vcxproj.user | 27 +- Gens/include/debugwindow.h | 161 ++++----- Gens/src/debugwindow.cpp | 308 ++++++++--------- Gens/src/g_main.cpp | 37 +- Gensida/ida/ida_debug.cpp | 208 ++++++++---- proto/debug_proto_68k.grpc.pb.cc | 42 +++ proto/debug_proto_68k.grpc.pb.h | 165 ++++++++- proto/debug_proto_68k.pb.cc | 563 ++++++++++++++++++++++++------- proto/debug_proto_68k.pb.h | 353 +++++++++++++++++-- proto/debug_proto_68k.proto | 450 ++++++++++++------------ proto/debug_proto_z80.grpc.pb.cc | 42 +++ proto/debug_proto_z80.grpc.pb.h | 165 ++++++++- proto/debug_proto_z80.pb.cc | 541 +++++++++++++++++++++++------ proto/debug_proto_z80.pb.h | 353 +++++++++++++++++-- proto/debug_proto_z80.proto | 366 ++++++++++---------- 16 files changed, 2781 insertions(+), 1001 deletions(-) diff --git a/.gitignore b/.gitignore index 4ec6855..c689723 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.obj +*.json *.tlog *.pdb *.iobj diff --git a/Gens/gens.vcxproj.user b/Gens/gens.vcxproj.user index f8afa5d..e0ef65e 100644 --- a/Gens/gens.vcxproj.user +++ b/Gens/gens.vcxproj.user @@ -1,14 +1,15 @@ - - - - WindowsLocalDebugger - - - WindowsLocalDebugger - - - -nodebug 1 - $(OutDir) - WindowsLocalDebugger - + + + + WindowsLocalDebugger + + + WindowsLocalDebugger + + + + + $(OutDir) + WindowsLocalDebugger + \ No newline at end of file diff --git a/Gens/include/debugwindow.h b/Gens/include/debugwindow.h index 8ae2e59..3f4d67b 100644 --- a/Gens/include/debugwindow.h +++ b/Gens/include/debugwindow.h @@ -1,79 +1,82 @@ -#ifndef DEBUG_WINDOW_H -#define DEBUG_WINDOW_H - -#include -#include -#include - -typedef unsigned int uint32; -typedef unsigned short ushort; - -enum class bp_type -{ - BP_PC = 1, - BP_READ, - BP_WRITE, -}; - -struct Breakpoint -{ - bp_type type; - - uint32 start; - uint32 end; - - bool enabled; - bool is_forbid; - -#ifdef DEBUG_68K - bool is_vdp; - - Breakpoint(bp_type _type, uint32 _start, uint32 _end, bool _enabled, bool _is_vdp, bool _is_forbid) : - type(_type), start(_start), end(_end), enabled(_enabled), is_vdp(_is_vdp), is_forbid(_is_forbid) {}; -#else - Breakpoint(bp_type _type, uint32 _start, uint32 _end, bool _enabled, bool _is_forbid) : - type(_type), start(_start), end(_end), enabled(_enabled), is_forbid(_is_forbid) {}; -#endif -}; - -typedef std::vector bp_list; - -#ifdef DEBUG_68K -#define MAX_ROM_SIZE 0x800000 -#else -#define MAX_ROM_SIZE 0x10000 // including possible z80 code in 0x8000 - 0xFFFF -#endif - -struct DebugWindow -{ - DebugWindow(); - std::vector callstack; - std::map changed; - bp_list Breakpoints; - - bool DebugStop; - - bool StepInto; - uint32 StepOver; - - void Breakpoint(int pc); - - bool BreakPC(int pc); -#ifdef DEBUG_68K - bool BreakRead(int pc, uint32 start, uint32 stop, bool is_vdp); - bool BreakWrite(int pc, uint32 start, uint32 stop, bool is_vdp); -#else - bool BreakRead(int pc, uint32 start, uint32 stop); - bool BreakWrite(int pc, uint32 start, uint32 stop); -#endif - - virtual void DoStepOver(); - virtual void TracePC(int pc); - virtual void TraceRead(uint32 start, uint32 stop); - virtual void TraceWrite(uint32 start, uint32 stop); - virtual ~DebugWindow(); -}; - -extern void send_pause_event(int pc, std::map changed); - -#endif +#ifndef DEBUG_WINDOW_H +#define DEBUG_WINDOW_H + +#include +#include +#include + +typedef unsigned int uint32; +typedef unsigned short ushort; + +enum class bp_type +{ + BP_PC = 1, + BP_READ, + BP_WRITE, +}; + +struct Breakpoint +{ + bp_type type; + + uint32 start; + uint32 end; + + bool enabled; + + uint32 elang; + std::string condition; + +#ifdef DEBUG_68K + bool is_vdp; + + Breakpoint(bp_type _type, uint32 _start, uint32 _end, bool _enabled, bool _is_vdp, uint32 _elang, const std::string & _condition) : + type(_type), start(_start), end(_end), enabled(_enabled), is_vdp(_is_vdp), elang(_elang), condition(_condition) {}; +#else + Breakpoint(bp_type _type, uint32 _start, uint32 _end, bool _enabled, uint32 _elang, const std::string& _condition) : + type(_type), start(_start), end(_end), enabled(_enabled), elang(_elang), condition(_condition) {}; +#endif +}; + +typedef std::vector bp_list; + +#ifdef DEBUG_68K +#define MAX_ROM_SIZE 0x800000 +#else +#define MAX_ROM_SIZE 0x10000 // including possible z80 code in 0x8000 - 0xFFFF +#endif + +struct DebugWindow +{ + DebugWindow(); + std::vector callstack; + std::map changed; + bp_list Breakpoints; + + bool DebugStop; + + bool StepInto; + uint32 StepOver; + + void Breakpoint(int pc); + + bool BreakPC(int pc); +#ifdef DEBUG_68K + bool BreakRead(int pc, uint32 start, uint32 stop, bool is_vdp); + bool BreakWrite(int pc, uint32 start, uint32 stop, bool is_vdp); +#else + bool BreakRead(int pc, uint32 start, uint32 stop); + bool BreakWrite(int pc, uint32 start, uint32 stop); +#endif + + virtual void DoStepOver(); + virtual void TracePC(int pc); + virtual void TraceRead(uint32 start, uint32 stop); + virtual void TraceWrite(uint32 start, uint32 stop); + virtual ~DebugWindow(); +}; + +extern void send_pause_event(int pc, std::map changed); +extern bool evaluate_condition(uint32 elang, const char* condition); + +#endif diff --git a/Gens/src/debugwindow.cpp b/Gens/src/debugwindow.cpp index c817907..df9fee6 100644 --- a/Gens/src/debugwindow.cpp +++ b/Gens/src/debugwindow.cpp @@ -1,152 +1,158 @@ -#include "resource.h" -#include "gens.h" -#include "save.h" -#include "g_main.h" -#include "ramwatch.h" -#include "debugwindow.h" -#include "g_ddraw.h" -#include "star_68k.h" -#include "vdp_io.h" -#include -#include - -bool handled_ida_event; - -void Handle_Gens_Messages(); -extern int Gens_Running; -extern "C" int Clear_Sound_Buffer(void); - -DebugWindow::DebugWindow() -{ - DebugStop = false; - HWnd = NULL; - - StepInto = false; - StepOver = -1; -} - -DebugWindow::~DebugWindow() -{ -} - -void DebugWindow::TracePC(int pc) {} -void DebugWindow::TraceRead(uint32 start, uint32 stop) {} -void DebugWindow::TraceWrite(uint32 start, uint32 stop) {} -void DebugWindow::DoStepOver() {} - -void DebugWindow::Breakpoint(int pc) -{ - if (!handled_ida_event) - { - send_pause_event(pc, changed); - changed.clear(); - } - - Show_Genesis_Screen(HWnd); - Update_RAM_Watch(); - Clear_Sound_Buffer(); - - if (!DebugStop) - { - DebugStop = true; - MSG msg = { 0 }; - for (; Gens_Running && DebugStop;) - { - Handle_Gens_Messages(); - } - //DebugDummyHWnd=(HWND)0; - } -} - -bool DebugWindow::BreakPC(int pc) -{ - for (auto i = Breakpoints.cbegin(); i != Breakpoints.cend(); ++i) - { - if (i->type != bp_type::BP_PC) continue; - if (!(i->enabled)) continue; - - if (pc <= (int)(i->end) && pc >= (int)(i->start)) - { - return !(i->is_forbid); - } - } - return false; -} - -#ifdef DEBUG_68K -bool DebugWindow::BreakRead(int pc, uint32 start, uint32 stop, bool is_vdp) -#else -bool DebugWindow::BreakRead(int pc, uint32 start, uint32 stop) -#endif -{ - bool brk = false; - - for (auto i = Breakpoints.cbegin(); i != Breakpoints.cend(); ++i) - { - if (i->type != bp_type::BP_READ) continue; - if (!i->enabled) continue; -#ifdef DEBUG_68K - if (i->is_vdp != is_vdp) continue; -#endif - - if (start <= i->end && stop >= i->start) - { - brk = !(i->is_forbid); - break; - } - } - - if (!brk) return false; - - for (auto i = Breakpoints.cbegin(); i != Breakpoints.cend(); ++i) - { - if (i->type != bp_type::BP_PC) continue; - - if (i->enabled && i->is_forbid) - { - if (pc <= (int)(i->end) && pc >= (int)(i->start)) - return false; - } - } - - return true; -} - -#ifdef DEBUG_68K -bool DebugWindow::BreakWrite(int pc, uint32 start, uint32 stop, bool is_vdp) -#else -bool DebugWindow::BreakWrite(int pc, uint32 start, uint32 stop) -#endif -{ - bool brk = false; - - for (auto i = Breakpoints.cbegin(); i != Breakpoints.cend(); ++i) - { - if (i->type != bp_type::BP_WRITE) continue; - if (!i->enabled) continue; -#ifdef DEBUG_68K - if (i->is_vdp != is_vdp) continue; -#endif - - if (start <= i->end && stop >= i->start) - { - brk = !(i->is_forbid); - break; - } - } - - if (!brk) return false; - - for (auto i = Breakpoints.cbegin(); i != Breakpoints.cend(); ++i) - { - if (i->type != bp_type::BP_PC) continue; - - if (i->enabled && i->is_forbid) - { - if (pc <= (int)(i->end) && pc >= (int)(i->start)) - return false; - } - } - - return true; +#include "resource.h" +#include "gens.h" +#include "save.h" +#include "g_main.h" +#include "ramwatch.h" +#include "debugwindow.h" +#include "g_ddraw.h" +#include "star_68k.h" +#include "vdp_io.h" +#include +#include + +bool handled_ida_event; + +void Handle_Gens_Messages(); +extern int Gens_Running; +extern "C" int Clear_Sound_Buffer(void); + +DebugWindow::DebugWindow() +{ + DebugStop = false; + HWnd = NULL; + + StepInto = false; + StepOver = -1; +} + +DebugWindow::~DebugWindow() +{ +} + +void DebugWindow::TracePC(int pc) {} +void DebugWindow::TraceRead(uint32 start, uint32 stop) {} +void DebugWindow::TraceWrite(uint32 start, uint32 stop) {} +void DebugWindow::DoStepOver() {} + +void DebugWindow::Breakpoint(int pc) +{ + if (!handled_ida_event) + { + send_pause_event(pc, changed); + changed.clear(); + } + + Show_Genesis_Screen(HWnd); + Update_RAM_Watch(); + Clear_Sound_Buffer(); + + if (!DebugStop) + { + DebugStop = true; + MSG msg = { 0 }; + for (; Gens_Running && DebugStop;) + { + Handle_Gens_Messages(); + } + //DebugDummyHWnd=(HWND)0; + } +} + +bool DebugWindow::BreakPC(int pc) +{ + for (auto i = Breakpoints.cbegin(); i != Breakpoints.cend(); ++i) + { + if (i->type != bp_type::BP_PC) continue; + if (!(i->enabled)) continue; + + if (pc <= (int)(i->end) && pc >= (int)(i->start)) + { + return evaluate_condition(i->elang, i->condition.c_str()); + } + } + return false; +} + +#ifdef DEBUG_68K +bool DebugWindow::BreakRead(int pc, uint32 start, uint32 stop, bool is_vdp) +#else +bool DebugWindow::BreakRead(int pc, uint32 start, uint32 stop) +#endif +{ + bool brk = false; + + for (auto i = Breakpoints.cbegin(); i != Breakpoints.cend(); ++i) + { + if (i->type != bp_type::BP_READ) continue; + if (!i->enabled) continue; +#ifdef DEBUG_68K + if (i->is_vdp != is_vdp) continue; +#endif + + if (start <= i->end && stop >= i->start) + { + brk = evaluate_condition(i->elang, i->condition.c_str()); + break; + } + } + + if (!brk) return false; + + for (auto i = Breakpoints.cbegin(); i != Breakpoints.cend(); ++i) + { + if (i->type != bp_type::BP_PC) continue; + + if (i->enabled) { + bool ev = evaluate_condition(i->elang, i->condition.c_str()); + + if (!ev) { + if (pc <= (int)(i->end) && pc >= (int)(i->start)) + return false; + } + } + } + + return true; +} + +#ifdef DEBUG_68K +bool DebugWindow::BreakWrite(int pc, uint32 start, uint32 stop, bool is_vdp) +#else +bool DebugWindow::BreakWrite(int pc, uint32 start, uint32 stop) +#endif +{ + bool brk = false; + + for (auto i = Breakpoints.cbegin(); i != Breakpoints.cend(); ++i) + { + if (i->type != bp_type::BP_WRITE) continue; + if (!i->enabled) continue; +#ifdef DEBUG_68K + if (i->is_vdp != is_vdp) continue; +#endif + + if (start <= i->end && stop >= i->start) + { + brk = evaluate_condition(i->elang, i->condition.c_str()); + break; + } + } + + if (!brk) return false; + + for (auto i = Breakpoints.cbegin(); i != Breakpoints.cend(); ++i) + { + if (i->type != bp_type::BP_PC) continue; + + if (i->enabled) { + bool ev = evaluate_condition(i->elang, i->condition.c_str()); + + if (!ev) { + if (pc <= (int)(i->end) && pc >= (int)(i->start)) + return false; + } + } + } + + return true; } \ No newline at end of file diff --git a/Gens/src/g_main.cpp b/Gens/src/g_main.cpp index ee53c3d..361aadc 100644 --- a/Gens/src/g_main.cpp +++ b/Gens/src/g_main.cpp @@ -33,6 +33,7 @@ using idadebug::SoundBankMap; using idadebug::SoundBankRange; #endif using idadebug::Changed; +using idadebug::Condition; using idadebug::MemData; using idadebug::MemoryAS; using idadebug::MemoryAD; @@ -42,6 +43,7 @@ using idadebug::DbgBreakpoints; using idadebug::Callstack; using idadebug::PauseChanged; using google::protobuf::Empty; +using google::protobuf::BoolValue; using google::protobuf::Map; #include "gens.h" @@ -1478,6 +1480,19 @@ class DbgClientClient { return status.ok(); } + bool eval_condition(uint32 elang, const char* condition) { + Condition req; + BoolValue resp; + + req.set_elang(elang); + req.set_condition(condition); + + ClientContext context; + Status status = stub_->eval_condition(&context, req, &resp); + + return status.ok() && resp.value(); + } + private: std::unique_ptr stub_; }; @@ -1492,6 +1507,14 @@ void send_pause_event(int pc, std::map changed) { client->pause_event(pc, changed); } +bool evaluate_condition(uint32 elang, const char* condition) { + if (!client) { + return true; + } + + return (condition && condition[0] == 0) || client->eval_condition(elang, condition); +} + void stop_client() { if (!client) { return; @@ -1552,10 +1575,10 @@ static void toggle_pause() { class DbgServerHandler final : public DbgServer::Service { Status add_breakpoint(ServerContext* context, const DbgBreakpoint* request, Empty* response) override { #ifdef DEBUG_68K - Breakpoint b((bp_type)request->type(), request->bstart() & 0xFFFFFF, request->bend() & 0xFFFFFF, true, request->is_vdp(), false); + Breakpoint b((bp_type)request->type(), request->bstart() & 0xFFFFFF, request->bend() & 0xFFFFFF, true, request->is_vdp(), request->elang(), request->condition()); M68kDW.Breakpoints.push_back(b); #else - Breakpoint b((bp_type)request->type(), request->bstart() & 0xFFFFFF, request->bend() & 0xFFFFFF, true, false); + Breakpoint b((bp_type)request->type(), request->bstart() & 0xFFFFFF, request->bend() & 0xFFFFFF, true, request->elang(), request->condition()); Z80DW.Breakpoints.push_back(b); #endif @@ -1637,7 +1660,8 @@ class DbgServerHandler final : public DbgServer::Service { #ifdef DEBUG_68K bpt->set_is_vdp(i->is_vdp); #endif - bpt->set_is_forbid(i->is_forbid); + bpt->set_elang(i->elang); + bpt->set_condition(i->condition.c_str()); bpt->set_bstart(i->start); bpt->set_bend(i->end); bpt->set_type((BpType)i->type); @@ -2190,7 +2214,8 @@ class DbgServerHandler final : public DbgServer::Service { if (request->is_vdp() == i->is_vdp) { #endif i->enabled = request->enabled(); - i->is_forbid = request->is_forbid(); + i->elang = request->elang(); + i->condition = request->condition(); break; #ifdef DEBUG_68K } @@ -2261,11 +2286,11 @@ static void init_dbg_server(int portnum) { #ifdef DEBUG_68K M68kDW.Breakpoints.clear(); - Breakpoint b(bp_type::BP_PC, main68k_context.pc & 0xFFFFFF, main68k_context.pc & 0xFFFFFF, true, false, false); + Breakpoint b(bp_type::BP_PC, main68k_context.pc & 0xFFFFFF, main68k_context.pc & 0xFFFFFF, true, false, 0, ""); M68kDW.Breakpoints.push_back(b); #else Z80DW.Breakpoints.clear(); - Breakpoint b(bp_type::BP_PC, 0, 0, true, false); + Breakpoint b(bp_type::BP_PC, 0, 0, true, 0, ""); Z80DW.Breakpoints.push_back(b); #endif diff --git a/Gensida/ida/ida_debug.cpp b/Gensida/ida/ida_debug.cpp index f85a5fc..fb8e4aa 100644 --- a/Gensida/ida/ida_debug.cpp +++ b/Gensida/ida/ida_debug.cpp @@ -33,6 +33,7 @@ using idadebug::VdpRegs; using idadebug::DmaInfo; #endif using idadebug::Changed; +using idadebug::Condition; using idadebug::MemData; using idadebug::MemoryAS; using idadebug::MemoryAD; @@ -42,6 +43,7 @@ using idadebug::DbgBreakpoints; using idadebug::Callstack; using idadebug::PauseChanged; using google::protobuf::Empty; +using google::protobuf::BoolValue; using google::protobuf::Map; #include @@ -50,6 +52,7 @@ using google::protobuf::Map; #include #include #include +#include #include "ida_debmod.h" @@ -252,6 +255,58 @@ void stop_server() { server->Shutdown(); //std::chrono::system_clock::now() + std::chrono::milliseconds(100)); } +static class cond_break_t : public exec_request_t { + uint32 elang = 0; + const char* cond = nullptr; +public: + cond_break_t() {}; + cond_break_t(uint32 _elang, const char* _cond) : elang(_elang), cond(_cond) {}; + + int idaapi execute(void) override { + extlang_object_t elng = find_extlang_by_index(elang); + + idc_value_t rv; + qstring errbuf; + qstring func; + + if (elng->is_idc()) { + func.sprnt("static main() {\n"); + } + else { + func.sprnt("def main():\n"); + } + + qstrvec_t lines; + qstring full(cond); + full.split(&lines, "\n"); + + for (const auto line : lines) { + func.cat_sprnt(" %s\n", line.c_str()); + } + + if (elng->is_idc()) { + func.cat_sprnt("}\n"); + } + + bool res = elng->eval_snippet(func.c_str(), &errbuf); + + if (!res || !errbuf.empty()) { + warning(errbuf.c_str()); + } + else { + res = elng->call_func(&rv, "main", nullptr, 0, &errbuf); + + if (!res || !errbuf.empty()) { + warning(errbuf.c_str()); + } + else { + return rv.num; + } + } + return 1; + } +}; + class DbgClientHandler final : public DbgClient::Service { Status pause_event(ServerContext* context, const PauseChanged* request, Empty* response) override { apply_codemap(request->changed()); @@ -294,6 +349,15 @@ class DbgClientHandler final : public DbgClient::Service { return Status::OK; } + + Status eval_condition(ServerContext* context, const Condition* request, BoolValue* response) override { + suspend_process(); + cond_break_t cond(request->elang(), request->condition().c_str()); + int res = execute_sync(cond, MFF_FAST); + response->set_value(res); + continue_process(); + return Status::OK; + } }; static void IdaServerFunc(int portnum) { @@ -1192,7 +1256,12 @@ static drc_t idaapi update_bpts(int* nbpts, update_bpt_info_t *bpts, int nadd, i #ifdef DEBUG_68K bp.set_is_vdp(is_vdp); #endif - bp.set_is_forbid(false); + + bpt_t bpt; + if (get_bpt(start, &bpt) && !bpt.cndbody.empty()) { + bp.set_elang(bpt.get_cnd_elang_idx()); + bp.set_condition(bpt.cndbody.c_str()); + } if (client && !client->add_breakpoint(bp)) { return DRC_FAILED; @@ -1251,7 +1320,12 @@ static drc_t idaapi update_bpts(int* nbpts, update_bpt_info_t *bpts, int nadd, i #ifdef DEBUG_68K bp.set_is_vdp(is_vdp); #endif - bp.set_is_forbid(false); + + bpt_t bpt; + if (get_bpt(start, &bpt) && !bpt.cndbody.empty()) { + bp.set_elang(bpt.get_cnd_elang_idx()); + bp.set_condition(bpt.cndbody.c_str()); + } if (client && !client->del_breakpoint(bp)) { return DRC_FAILED; @@ -1275,67 +1349,67 @@ static drc_t idaapi update_bpts(int* nbpts, update_bpt_info_t *bpts, int nadd, i // Update low-level (server side) breakpoint conditions // Returns nlowcnds. -1-network error // This function is called from debthread -static drc_t idaapi update_lowcnds(int* nupdated, const lowcnd_t *lowcnds, int nlowcnds, qstring* errbuf) { - for (int i = 0; i < nlowcnds; ++i) { - ea_t start = lowcnds[i].ea; - ea_t end = lowcnds[i].ea + lowcnds[i].size - 1; - BpType type1 = BpType::BP_PC; - int type2 = 0; -#ifdef DEBUG_68K - bool is_vdp = false; -#endif - - switch (lowcnds[i].type) { - case BPT_EXEC: - type1 = BpType::BP_PC; - break; - case BPT_READ: - type1 = BpType::BP_READ; - break; - case BPT_WRITE: - type1 = BpType::BP_WRITE; - break; - case BPT_RDWR: - type1 = BpType::BP_READ; - type2 = (int)BpType::BP_WRITE; - break; - } - -#ifdef DEBUG_68K - if (start >= BREAKPOINTS_BASE && end < BREAKPOINTS_BASE + 0x30000) { - start -= BREAKPOINTS_BASE; - end -= BREAKPOINTS_BASE; - is_vdp = true; - } -#endif - - DbgBreakpoint bp; - bp.set_bstart(start & 0xFFFFFF); - bp.set_bend(end & 0xFFFFFF); - bp.set_type(type1); - - bp.set_enabled(true); -#ifdef DEBUG_68K - bp.set_is_vdp(is_vdp); -#endif - bp.set_is_forbid(lowcnds[i].cndbody.empty() ? false : ((lowcnds[i].cndbody[0] == '1') ? true : false)); - - if (client && !client->update_breakpoint(bp)) { - return DRC_FAILED; - } - - if (type2 != 0) { - bp.set_type((BpType)type2); - - if (client && !client->update_breakpoint(bp)) { - return DRC_FAILED; - } - } - } - - *nupdated = nlowcnds; - return DRC_OK; -} +//static drc_t idaapi update_lowcnds(int* nupdated, const lowcnd_t *lowcnds, int nlowcnds, qstring* errbuf) { +// for (int i = 0; i < nlowcnds; ++i) { +// ea_t start = lowcnds[i].ea; +// ea_t end = lowcnds[i].ea + lowcnds[i].size - 1; +// BpType type1 = BpType::BP_PC; +// int type2 = 0; +//#ifdef DEBUG_68K +// bool is_vdp = false; +//#endif +// +// switch (lowcnds[i].type) { +// case BPT_EXEC: +// type1 = BpType::BP_PC; +// break; +// case BPT_READ: +// type1 = BpType::BP_READ; +// break; +// case BPT_WRITE: +// type1 = BpType::BP_WRITE; +// break; +// case BPT_RDWR: +// type1 = BpType::BP_READ; +// type2 = (int)BpType::BP_WRITE; +// break; +// } +// +//#ifdef DEBUG_68K +// if (start >= BREAKPOINTS_BASE && end < BREAKPOINTS_BASE + 0x30000) { +// start -= BREAKPOINTS_BASE; +// end -= BREAKPOINTS_BASE; +// is_vdp = true; +// } +//#endif +// +// DbgBreakpoint bp; +// bp.set_bstart(start & 0xFFFFFF); +// bp.set_bend(end & 0xFFFFFF); +// bp.set_type(type1); +// +// bp.set_enabled(true); +//#ifdef DEBUG_68K +// bp.set_is_vdp(is_vdp); +//#endif +// bp.set_is_forbid(lowcnds[i].cndbody.empty() ? false : ((lowcnds[i].cndbody[0] == '1') ? true : false)); +// +// if (client && !client->update_breakpoint(bp)) { +// return DRC_FAILED; +// } +// +// if (type2 != 0) { +// bp.set_type((BpType)type2); +// +// if (client && !client->update_breakpoint(bp)) { +// return DRC_FAILED; +// } +// } +// } +// +// *nupdated = nlowcnds; +// return DRC_OK; +//} // Calculate the call stack trace // This function is called when the process is suspended and should fill @@ -1573,14 +1647,14 @@ static ssize_t idaapi idd_notify(void*, int msgid, va_list va) { } break; - case debugger_t::ev_update_lowcnds: { + /*case debugger_t::ev_update_lowcnds: { int* nupdated = va_arg(va, int*); const lowcnd_t* lowcnds = va_arg(va, const lowcnd_t*); int nlowcnds = va_arg(va, int); errbuf = va_arg(va, qstring*); retcode = update_lowcnds(nupdated, lowcnds, nlowcnds, errbuf); } - break; + break;*/ #ifdef HAVE_UPDATE_CALL_STACK case debugger_t::ev_update_call_stack: { @@ -1634,8 +1708,8 @@ debugger_t debugger = { 0x8000 + 2, "z80", #endif - DBG_FLAG_REMOTE | DBG_FLAG_NEEDPORT | DBG_FLAG_CAN_CONT_BPT | DBG_FLAG_FAKE_ATTACH | DBG_FLAG_SAFE | DBG_FLAG_NOPASSWORD | DBG_FLAG_NOSTARTDIR | DBG_FLAG_NOPARAMETERS | DBG_FLAG_ANYSIZE_HWBPT | DBG_FLAG_DEBTHREAD | DBG_FLAG_PREFER_SWBPTS, - DBG_HAS_GET_PROCESSES | DBG_HAS_REQUEST_PAUSE | DBG_HAS_SET_RESUME_MODE | DBG_HAS_CHECK_BPT | DBG_HAS_THREAD_SUSPEND | DBG_HAS_THREAD_CONTINUE | DBG_FLAG_LOWCNDS, + DBG_FLAG_NOHOST | DBG_FLAG_CAN_CONT_BPT | DBG_FLAG_SAFE | DBG_FLAG_FAKE_ATTACH | DBG_FLAG_NOPASSWORD | DBG_FLAG_NOSTARTDIR | DBG_FLAG_NOPARAMETERS | DBG_FLAG_ANYSIZE_HWBPT | DBG_FLAG_DEBTHREAD | DBG_FLAG_PREFER_SWBPTS /*| DBG_FLAG_LOWCNDS*/, + DBG_HAS_GET_PROCESSES | DBG_HAS_REQUEST_PAUSE | DBG_HAS_SET_RESUME_MODE | DBG_HAS_CHECK_BPT | DBG_HAS_THREAD_SUSPEND | DBG_HAS_THREAD_CONTINUE, register_classes, RC_GENERAL, diff --git a/proto/debug_proto_68k.grpc.pb.cc b/proto/debug_proto_68k.grpc.pb.cc index 2f05e6d..1a321ed 100644 --- a/proto/debug_proto_68k.grpc.pb.cc +++ b/proto/debug_proto_68k.grpc.pb.cc @@ -968,6 +968,7 @@ static const char* DbgClient_method_names[] = { "/idadebug.DbgClient/start_event", "/idadebug.DbgClient/pause_event", "/idadebug.DbgClient/stop_event", + "/idadebug.DbgClient/eval_condition", }; std::unique_ptr< DbgClient::Stub> DbgClient::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { @@ -980,6 +981,7 @@ DbgClient::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, : channel_(channel), rpcmethod_start_event_(DbgClient_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) , rpcmethod_pause_event_(DbgClient_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) , rpcmethod_stop_event_(DbgClient_method_names[2], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_eval_condition_(DbgClient_method_names[3], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) {} ::grpc::Status DbgClient::Stub::start_event(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::google::protobuf::Empty* response) { @@ -1051,6 +1053,29 @@ ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* DbgClient::Stub:: return result; } +::grpc::Status DbgClient::Stub::eval_condition(::grpc::ClientContext* context, const ::idadebug::Condition& request, ::google::protobuf::BoolValue* response) { + return ::grpc::internal::BlockingUnaryCall< ::idadebug::Condition, ::google::protobuf::BoolValue, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_eval_condition_, context, request, response); +} + +void DbgClient::Stub::async::eval_condition(::grpc::ClientContext* context, const ::idadebug::Condition* request, ::google::protobuf::BoolValue* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::idadebug::Condition, ::google::protobuf::BoolValue, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_eval_condition_, context, request, response, std::move(f)); +} + +void DbgClient::Stub::async::eval_condition(::grpc::ClientContext* context, const ::idadebug::Condition* request, ::google::protobuf::BoolValue* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_eval_condition_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::google::protobuf::BoolValue>* DbgClient::Stub::PrepareAsynceval_conditionRaw(::grpc::ClientContext* context, const ::idadebug::Condition& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::google::protobuf::BoolValue, ::idadebug::Condition, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_eval_condition_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::google::protobuf::BoolValue>* DbgClient::Stub::Asynceval_conditionRaw(::grpc::ClientContext* context, const ::idadebug::Condition& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsynceval_conditionRaw(context, request, cq); + result->StartCall(); + return result; +} + DbgClient::Service::Service() { AddMethod(new ::grpc::internal::RpcServiceMethod( DbgClient_method_names[0], @@ -1082,6 +1107,16 @@ DbgClient::Service::Service() { ::google::protobuf::Empty* resp) { return service->stop_event(ctx, req, resp); }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + DbgClient_method_names[3], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< DbgClient::Service, ::idadebug::Condition, ::google::protobuf::BoolValue, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](DbgClient::Service* service, + ::grpc::ServerContext* ctx, + const ::idadebug::Condition* req, + ::google::protobuf::BoolValue* resp) { + return service->eval_condition(ctx, req, resp); + }, this))); } DbgClient::Service::~Service() { @@ -1108,6 +1143,13 @@ ::grpc::Status DbgClient::Service::stop_event(::grpc::ServerContext* context, co return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } +::grpc::Status DbgClient::Service::eval_condition(::grpc::ServerContext* context, const ::idadebug::Condition* request, ::google::protobuf::BoolValue* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + } // namespace idadebug diff --git a/proto/debug_proto_68k.grpc.pb.h b/proto/debug_proto_68k.grpc.pb.h index 6eceaeb..b53654b 100644 --- a/proto/debug_proto_68k.grpc.pb.h +++ b/proto/debug_proto_68k.grpc.pb.h @@ -3560,6 +3560,13 @@ class DbgClient final { std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>> PrepareAsyncstop_event(::grpc::ClientContext* context, const ::idadebug::Changed& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>>(PrepareAsyncstop_eventRaw(context, request, cq)); } + virtual ::grpc::Status eval_condition(::grpc::ClientContext* context, const ::idadebug::Condition& request, ::google::protobuf::BoolValue* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::BoolValue>> Asynceval_condition(::grpc::ClientContext* context, const ::idadebug::Condition& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::BoolValue>>(Asynceval_conditionRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::BoolValue>> PrepareAsynceval_condition(::grpc::ClientContext* context, const ::idadebug::Condition& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::BoolValue>>(PrepareAsynceval_conditionRaw(context, request, cq)); + } class async_interface { public: virtual ~async_interface() {} @@ -3569,6 +3576,8 @@ class DbgClient final { virtual void pause_event(::grpc::ClientContext* context, const ::idadebug::PauseChanged* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) = 0; virtual void stop_event(::grpc::ClientContext* context, const ::idadebug::Changed* request, ::google::protobuf::Empty* response, std::function) = 0; virtual void stop_event(::grpc::ClientContext* context, const ::idadebug::Changed* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void eval_condition(::grpc::ClientContext* context, const ::idadebug::Condition* request, ::google::protobuf::BoolValue* response, std::function) = 0; + virtual void eval_condition(::grpc::ClientContext* context, const ::idadebug::Condition* request, ::google::protobuf::BoolValue* response, ::grpc::ClientUnaryReactor* reactor) = 0; }; typedef class async_interface experimental_async_interface; virtual class async_interface* async() { return nullptr; } @@ -3580,6 +3589,8 @@ class DbgClient final { virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>* PrepareAsyncpause_eventRaw(::grpc::ClientContext* context, const ::idadebug::PauseChanged& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>* Asyncstop_eventRaw(::grpc::ClientContext* context, const ::idadebug::Changed& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>* PrepareAsyncstop_eventRaw(::grpc::ClientContext* context, const ::idadebug::Changed& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::BoolValue>* Asynceval_conditionRaw(::grpc::ClientContext* context, const ::idadebug::Condition& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::BoolValue>* PrepareAsynceval_conditionRaw(::grpc::ClientContext* context, const ::idadebug::Condition& request, ::grpc::CompletionQueue* cq) = 0; }; class Stub final : public StubInterface { public: @@ -3605,6 +3616,13 @@ class DbgClient final { std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>> PrepareAsyncstop_event(::grpc::ClientContext* context, const ::idadebug::Changed& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>>(PrepareAsyncstop_eventRaw(context, request, cq)); } + ::grpc::Status eval_condition(::grpc::ClientContext* context, const ::idadebug::Condition& request, ::google::protobuf::BoolValue* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::BoolValue>> Asynceval_condition(::grpc::ClientContext* context, const ::idadebug::Condition& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::BoolValue>>(Asynceval_conditionRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::BoolValue>> PrepareAsynceval_condition(::grpc::ClientContext* context, const ::idadebug::Condition& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::BoolValue>>(PrepareAsynceval_conditionRaw(context, request, cq)); + } class async final : public StubInterface::async_interface { public: @@ -3614,6 +3632,8 @@ class DbgClient final { void pause_event(::grpc::ClientContext* context, const ::idadebug::PauseChanged* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) override; void stop_event(::grpc::ClientContext* context, const ::idadebug::Changed* request, ::google::protobuf::Empty* response, std::function) override; void stop_event(::grpc::ClientContext* context, const ::idadebug::Changed* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) override; + void eval_condition(::grpc::ClientContext* context, const ::idadebug::Condition* request, ::google::protobuf::BoolValue* response, std::function) override; + void eval_condition(::grpc::ClientContext* context, const ::idadebug::Condition* request, ::google::protobuf::BoolValue* response, ::grpc::ClientUnaryReactor* reactor) override; private: friend class Stub; explicit async(Stub* stub): stub_(stub) { } @@ -3631,9 +3651,12 @@ class DbgClient final { ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* PrepareAsyncpause_eventRaw(::grpc::ClientContext* context, const ::idadebug::PauseChanged& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* Asyncstop_eventRaw(::grpc::ClientContext* context, const ::idadebug::Changed& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* PrepareAsyncstop_eventRaw(::grpc::ClientContext* context, const ::idadebug::Changed& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::google::protobuf::BoolValue>* Asynceval_conditionRaw(::grpc::ClientContext* context, const ::idadebug::Condition& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::google::protobuf::BoolValue>* PrepareAsynceval_conditionRaw(::grpc::ClientContext* context, const ::idadebug::Condition& request, ::grpc::CompletionQueue* cq) override; const ::grpc::internal::RpcMethod rpcmethod_start_event_; const ::grpc::internal::RpcMethod rpcmethod_pause_event_; const ::grpc::internal::RpcMethod rpcmethod_stop_event_; + const ::grpc::internal::RpcMethod rpcmethod_eval_condition_; }; static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); @@ -3644,6 +3667,7 @@ class DbgClient final { virtual ::grpc::Status start_event(::grpc::ServerContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::Empty* response); virtual ::grpc::Status pause_event(::grpc::ServerContext* context, const ::idadebug::PauseChanged* request, ::google::protobuf::Empty* response); virtual ::grpc::Status stop_event(::grpc::ServerContext* context, const ::idadebug::Changed* request, ::google::protobuf::Empty* response); + virtual ::grpc::Status eval_condition(::grpc::ServerContext* context, const ::idadebug::Condition* request, ::google::protobuf::BoolValue* response); }; template class WithAsyncMethod_start_event : public BaseClass { @@ -3705,7 +3729,27 @@ class DbgClient final { ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag); } }; - typedef WithAsyncMethod_start_event > > AsyncService; + template + class WithAsyncMethod_eval_condition : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_eval_condition() { + ::grpc::Service::MarkMethodAsync(3); + } + ~WithAsyncMethod_eval_condition() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status eval_condition(::grpc::ServerContext* /*context*/, const ::idadebug::Condition* /*request*/, ::google::protobuf::BoolValue* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void Requesteval_condition(::grpc::ServerContext* context, ::idadebug::Condition* request, ::grpc::ServerAsyncResponseWriter< ::google::protobuf::BoolValue>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(3, context, request, response, new_call_cq, notification_cq, tag); + } + }; + typedef WithAsyncMethod_start_event > > > AsyncService; template class WithCallbackMethod_start_event : public BaseClass { private: @@ -3787,7 +3831,34 @@ class DbgClient final { virtual ::grpc::ServerUnaryReactor* stop_event( ::grpc::CallbackServerContext* /*context*/, const ::idadebug::Changed* /*request*/, ::google::protobuf::Empty* /*response*/) { return nullptr; } }; - typedef WithCallbackMethod_start_event > > CallbackService; + template + class WithCallbackMethod_eval_condition : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_eval_condition() { + ::grpc::Service::MarkMethodCallback(3, + new ::grpc::internal::CallbackUnaryHandler< ::idadebug::Condition, ::google::protobuf::BoolValue>( + [this]( + ::grpc::CallbackServerContext* context, const ::idadebug::Condition* request, ::google::protobuf::BoolValue* response) { return this->eval_condition(context, request, response); }));} + void SetMessageAllocatorFor_eval_condition( + ::grpc::MessageAllocator< ::idadebug::Condition, ::google::protobuf::BoolValue>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(3); + static_cast<::grpc::internal::CallbackUnaryHandler< ::idadebug::Condition, ::google::protobuf::BoolValue>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_eval_condition() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status eval_condition(::grpc::ServerContext* /*context*/, const ::idadebug::Condition* /*request*/, ::google::protobuf::BoolValue* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* eval_condition( + ::grpc::CallbackServerContext* /*context*/, const ::idadebug::Condition* /*request*/, ::google::protobuf::BoolValue* /*response*/) { return nullptr; } + }; + typedef WithCallbackMethod_start_event > > > CallbackService; typedef CallbackService ExperimentalCallbackService; template class WithGenericMethod_start_event : public BaseClass { @@ -3841,6 +3912,23 @@ class DbgClient final { } }; template + class WithGenericMethod_eval_condition : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_eval_condition() { + ::grpc::Service::MarkMethodGeneric(3); + } + ~WithGenericMethod_eval_condition() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status eval_condition(::grpc::ServerContext* /*context*/, const ::idadebug::Condition* /*request*/, ::google::protobuf::BoolValue* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template class WithRawMethod_start_event : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} @@ -3901,6 +3989,26 @@ class DbgClient final { } }; template + class WithRawMethod_eval_condition : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_eval_condition() { + ::grpc::Service::MarkMethodRaw(3); + } + ~WithRawMethod_eval_condition() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status eval_condition(::grpc::ServerContext* /*context*/, const ::idadebug::Condition* /*request*/, ::google::protobuf::BoolValue* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void Requesteval_condition(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(3, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template class WithRawCallbackMethod_start_event : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} @@ -3967,6 +4075,28 @@ class DbgClient final { ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } }; template + class WithRawCallbackMethod_eval_condition : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_eval_condition() { + ::grpc::Service::MarkMethodRawCallback(3, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->eval_condition(context, request, response); })); + } + ~WithRawCallbackMethod_eval_condition() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status eval_condition(::grpc::ServerContext* /*context*/, const ::idadebug::Condition* /*request*/, ::google::protobuf::BoolValue* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* eval_condition( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template class WithStreamedUnaryMethod_start_event : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} @@ -4047,9 +4177,36 @@ class DbgClient final { // replace default version of method with streamed unary virtual ::grpc::Status Streamedstop_event(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::idadebug::Changed,::google::protobuf::Empty>* server_unary_streamer) = 0; }; - typedef WithStreamedUnaryMethod_start_event > > StreamedUnaryService; + template + class WithStreamedUnaryMethod_eval_condition : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_eval_condition() { + ::grpc::Service::MarkMethodStreamed(3, + new ::grpc::internal::StreamedUnaryHandler< + ::idadebug::Condition, ::google::protobuf::BoolValue>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::idadebug::Condition, ::google::protobuf::BoolValue>* streamer) { + return this->Streamedeval_condition(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_eval_condition() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status eval_condition(::grpc::ServerContext* /*context*/, const ::idadebug::Condition* /*request*/, ::google::protobuf::BoolValue* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status Streamedeval_condition(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::idadebug::Condition,::google::protobuf::BoolValue>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_start_event > > > StreamedUnaryService; typedef Service SplitStreamedService; - typedef WithStreamedUnaryMethod_start_event > > StreamedService; + typedef WithStreamedUnaryMethod_start_event > > > StreamedService; }; } // namespace idadebug diff --git a/proto/debug_proto_68k.pb.cc b/proto/debug_proto_68k.pb.cc index 756ce21..b1b5e56 100644 --- a/proto/debug_proto_68k.pb.cc +++ b/proto/debug_proto_68k.pb.cc @@ -187,12 +187,13 @@ struct MemoryADDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MemoryADDefaultTypeInternal _MemoryAD_default_instance_; PROTOBUF_CONSTEXPR DbgBreakpoint::DbgBreakpoint( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.type_)*/0 + /*decltype(_impl_.condition_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.type_)*/0 , /*decltype(_impl_.bstart_)*/0u , /*decltype(_impl_.bend_)*/0u , /*decltype(_impl_.enabled_)*/false , /*decltype(_impl_.is_vdp_)*/false - , /*decltype(_impl_.is_forbid_)*/false + , /*decltype(_impl_.elang_)*/0u , /*decltype(_impl_._cached_size_)*/{}} {} struct DbgBreakpointDefaultTypeInternal { PROTOBUF_CONSTEXPR DbgBreakpointDefaultTypeInternal() @@ -305,8 +306,22 @@ struct ChangedDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ChangedDefaultTypeInternal _Changed_default_instance_; +PROTOBUF_CONSTEXPR Condition::Condition( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.condition_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.elang_)*/0u + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ConditionDefaultTypeInternal { + PROTOBUF_CONSTEXPR ConditionDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ConditionDefaultTypeInternal() {} + union { + Condition _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ConditionDefaultTypeInternal _Condition_default_instance_; } // namespace idadebug -static ::_pb::Metadata file_level_metadata_debug_5fproto_5f68k_2eproto[18]; +static ::_pb::Metadata file_level_metadata_debug_5fproto_5f68k_2eproto[19]; static const ::_pb::EnumDescriptor* file_level_enum_descriptors_debug_5fproto_5f68k_2eproto[3]; static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_debug_5fproto_5f68k_2eproto = nullptr; @@ -432,7 +447,8 @@ const uint32_t TableStruct_debug_5fproto_5f68k_2eproto::offsets[] PROTOBUF_SECTI PROTOBUF_FIELD_OFFSET(::idadebug::DbgBreakpoint, _impl_.bend_), PROTOBUF_FIELD_OFFSET(::idadebug::DbgBreakpoint, _impl_.enabled_), PROTOBUF_FIELD_OFFSET(::idadebug::DbgBreakpoint, _impl_.is_vdp_), - PROTOBUF_FIELD_OFFSET(::idadebug::DbgBreakpoint, _impl_.is_forbid_), + PROTOBUF_FIELD_OFFSET(::idadebug::DbgBreakpoint, _impl_.elang_), + PROTOBUF_FIELD_OFFSET(::idadebug::DbgBreakpoint, _impl_.condition_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::idadebug::DbgBreakpoints, _internal_metadata_), ~0u, // no _extensions_ @@ -496,6 +512,14 @@ const uint32_t TableStruct_debug_5fproto_5f68k_2eproto::offsets[] PROTOBUF_SECTI ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::idadebug::Changed, _impl_.changed_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::idadebug::Condition, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::idadebug::Condition, _impl_.elang_), + PROTOBUF_FIELD_OFFSET(::idadebug::Condition, _impl_.condition_), }; static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, -1, sizeof(::idadebug::GpReg)}, @@ -508,14 +532,15 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode { 94, -1, -1, sizeof(::idadebug::MemoryAS)}, { 102, -1, -1, sizeof(::idadebug::MemoryAD)}, { 110, -1, -1, sizeof(::idadebug::DbgBreakpoint)}, - { 122, -1, -1, sizeof(::idadebug::DbgBreakpoints)}, - { 129, -1, -1, sizeof(::idadebug::Callstack)}, - { 136, -1, -1, sizeof(::idadebug::AnyRegValue)}, - { 143, -1, -1, sizeof(::idadebug::MemData)}, - { 150, 158, -1, sizeof(::idadebug::PauseChanged_ChangedEntry_DoNotUse)}, - { 160, -1, -1, sizeof(::idadebug::PauseChanged)}, - { 168, 176, -1, sizeof(::idadebug::Changed_ChangedEntry_DoNotUse)}, - { 178, -1, -1, sizeof(::idadebug::Changed)}, + { 123, -1, -1, sizeof(::idadebug::DbgBreakpoints)}, + { 130, -1, -1, sizeof(::idadebug::Callstack)}, + { 137, -1, -1, sizeof(::idadebug::AnyRegValue)}, + { 144, -1, -1, sizeof(::idadebug::MemData)}, + { 151, 159, -1, sizeof(::idadebug::PauseChanged_ChangedEntry_DoNotUse)}, + { 161, -1, -1, sizeof(::idadebug::PauseChanged)}, + { 169, 177, -1, sizeof(::idadebug::Changed_ChangedEntry_DoNotUse)}, + { 179, -1, -1, sizeof(::idadebug::Changed)}, + { 186, -1, -1, sizeof(::idadebug::Condition)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -537,108 +562,114 @@ static const ::_pb::Message* const file_default_instances[] = { &::idadebug::_PauseChanged_default_instance_._instance, &::idadebug::_Changed_ChangedEntry_DoNotUse_default_instance_._instance, &::idadebug::_Changed_default_instance_._instance, + &::idadebug::_Condition_default_instance_._instance, }; const char descriptor_table_protodef_debug_5fproto_5f68k_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n\025debug_proto_68k.proto\022\010idadebug\032\033googl" - "e/protobuf/empty.proto\"*\n\005GpReg\022!\n\003reg\030\001" - " \001(\0162\024.idadebug.GpRegsEnum\"\354\001\n\006GpRegs\022\n\n" - "\002D0\030\001 \001(\r\022\n\n\002D1\030\002 \001(\r\022\n\n\002D2\030\003 \001(\r\022\n\n\002D3\030" - "\004 \001(\r\022\n\n\002D4\030\005 \001(\r\022\n\n\002D5\030\006 \001(\r\022\n\n\002D6\030\007 \001(" - "\r\022\n\n\002D7\030\010 \001(\r\022\n\n\002A0\030\t \001(\r\022\n\n\002A1\030\n \001(\r\022\n\n" - "\002A2\030\013 \001(\r\022\n\n\002A3\030\014 \001(\r\022\n\n\002A4\030\r \001(\r\022\n\n\002A5\030" - "\016 \001(\r\022\n\n\002A6\030\017 \001(\r\022\n\n\002A7\030\020 \001(\r\022\n\n\002PC\030\021 \001(" - "\r\022\n\n\002SP\030\022 \001(\r\022\n\n\002SR\030\023 \001(\r\"@\n\nGpRegValue\022" - "#\n\005index\030\001 \001(\0162\024.idadebug.GpRegsEnum\022\r\n\005" - "value\030\002 \001(\r\",\n\006VdpReg\022\"\n\003reg\030\001 \001(\0162\025.ida" - "debug.VdpRegsEnum\"\301\002\n\007VdpRegs\022\013\n\003V00\030\001 \001" - "(\r\022\013\n\003V01\030\002 \001(\r\022\013\n\003V02\030\003 \001(\r\022\013\n\003V03\030\004 \001(" - "\r\022\013\n\003V04\030\005 \001(\r\022\013\n\003V05\030\006 \001(\r\022\013\n\003V06\030\007 \001(\r" - "\022\013\n\003V07\030\010 \001(\r\022\013\n\003V08\030\t \001(\r\022\013\n\003V09\030\n \001(\r\022" - "\013\n\003V0A\030\013 \001(\r\022\013\n\003V0B\030\014 \001(\r\022\013\n\003V0C\030\r \001(\r\022\013" - "\n\003V0D\030\016 \001(\r\022\013\n\003V0E\030\017 \001(\r\022\013\n\003V0F\030\020 \001(\r\022\013\n" - "\003V10\030\021 \001(\r\022\013\n\003V11\030\022 \001(\r\022\013\n\003V12\030\023 \001(\r\022\013\n\003" - "V13\030\024 \001(\r\022\013\n\003V14\030\025 \001(\r\022\013\n\003V15\030\026 \001(\r\022\013\n\003V" - "16\030\027 \001(\r\022\013\n\003V17\030\030 \001(\r\"B\n\013VdpRegValue\022$\n\005" - "index\030\001 \001(\0162\025.idadebug.VdpRegsEnum\022\r\n\005va" - "lue\030\002 \001(\r\"0\n\007DmaInfo\022\013\n\003len\030\001 \001(\r\022\013\n\003src" - "\030\002 \001(\r\022\013\n\003dst\030\003 \001(\r\")\n\010MemoryAS\022\017\n\007addre" - "ss\030\001 \001(\r\022\014\n\004size\030\002 \001(\r\")\n\010MemoryAD\022\017\n\007ad" - "dress\030\001 \001(\r\022\014\n\004data\030\002 \001(\014\"\201\001\n\rDbgBreakpo" - "int\022\036\n\004type\030\001 \001(\0162\020.idadebug.BpType\022\016\n\006b" - "start\030\002 \001(\r\022\014\n\004bend\030\003 \001(\r\022\017\n\007enabled\030\004 \001" - "(\010\022\016\n\006is_vdp\030\005 \001(\010\022\021\n\tis_forbid\030\006 \001(\010\"7\n" - "\016DbgBreakpoints\022%\n\004list\030\001 \003(\0132\027.idadebug" - ".DbgBreakpoint\"\036\n\tCallstack\022\021\n\tcallstack" - "\030\001 \003(\r\"\034\n\013AnyRegValue\022\r\n\005value\030\001 \001(\r\"\027\n\007" - "MemData\022\014\n\004data\030\001 \001(\014\"\205\001\n\014PauseChanged\022\017" - "\n\007address\030\001 \001(\r\0224\n\007changed\030\002 \003(\0132#.idade" - "bug.PauseChanged.ChangedEntry\032.\n\014Changed" - "Entry\022\013\n\003key\030\001 \001(\r\022\r\n\005value\030\002 \001(\r:\0028\001\"j\n" - "\007Changed\022/\n\007changed\030\001 \003(\0132\036.idadebug.Cha" - "nged.ChangedEntry\032.\n\014ChangedEntry\022\013\n\003key" - "\030\001 \001(\r\022\r\n\005value\030\002 \001(\r:\0028\001*\244\001\n\nGpRegsEnum" - "\022\006\n\002D0\020\000\022\006\n\002D1\020\001\022\006\n\002D2\020\002\022\006\n\002D3\020\003\022\006\n\002D4\020\004" - "\022\006\n\002D5\020\005\022\006\n\002D6\020\006\022\006\n\002D7\020\007\022\006\n\002A0\020\010\022\006\n\002A1\020\n" - "\022\006\n\002A2\020\014\022\006\n\002A3\020\016\022\006\n\002A4\020\020\022\006\n\002A5\020\022\022\006\n\002A6\020\024" - "\022\006\n\002A7\020\026\022\006\n\002PC\020\030\022\006\n\002SP\020\032\022\006\n\002SR\020\034*\345\001\n\013Vdp" - "RegsEnum\022\007\n\003V00\020\000\022\007\n\003V01\020\001\022\007\n\003V02\020\002\022\007\n\003V" - "03\020\003\022\007\n\003V04\020\004\022\007\n\003V05\020\005\022\007\n\003V06\020\006\022\007\n\003V07\020\007" - "\022\007\n\003V08\020\010\022\007\n\003V09\020\t\022\007\n\003V0A\020\n\022\007\n\003V0B\020\013\022\007\n\003" - "V0C\020\014\022\007\n\003V0D\020\r\022\007\n\003V0E\020\016\022\007\n\003V0F\020\017\022\007\n\003V10\020" - "\020\022\007\n\003V11\020\021\022\007\n\003V12\020\022\022\007\n\003V13\020\023\022\007\n\003V14\020\024\022\007\n" - "\003V15\020\025\022\007\n\003V16\020\026\022\007\n\003V17\020\027*9\n\006BpType\022\t\n\005DU" - "MMY\020\000\022\t\n\005BP_PC\020\001\022\013\n\007BP_READ\020\002\022\014\n\010BP_WRIT" - "E\020\0032\214\013\n\tDbgServer\0226\n\nget_gp_reg\022\017.idadeb" - "ug.GpReg\032\025.idadebug.AnyRegValue\"\000\0229\n\013get" - "_gp_regs\022\026.google.protobuf.Empty\032\020.idade" - "bug.GpRegs\"\000\022<\n\nset_gp_reg\022\024.idadebug.Gp" - "RegValue\032\026.google.protobuf.Empty\"\000\0228\n\013ge" - "t_vdp_reg\022\020.idadebug.VdpReg\032\025.idadebug.A" - "nyRegValue\"\000\022;\n\014get_vdp_regs\022\026.google.pr" - "otobuf.Empty\032\021.idadebug.VdpRegs\"\000\022>\n\013set" - "_vdp_reg\022\025.idadebug.VdpRegValue\032\026.google" - ".protobuf.Empty\"\000\022;\n\014get_dma_info\022\026.goog" - "le.protobuf.Empty\032\021.idadebug.DmaInfo\"\000\0226" - "\n\013read_memory\022\022.idadebug.MemoryAS\032\021.idad" - "ebug.MemData\"\000\022<\n\014write_memory\022\022.idadebu" - "g.MemoryAD\032\026.google.protobuf.Empty\"\000\022E\n\017" - "get_breakpoints\022\026.google.protobuf.Empty\032" - "\030.idadebug.DbgBreakpoints\"\000\022C\n\016add_break" - "point\022\027.idadebug.DbgBreakpoint\032\026.google." - "protobuf.Empty\"\000\022F\n\021toggle_breakpoint\022\027." - "idadebug.DbgBreakpoint\032\026.google.protobuf" - ".Empty\"\000\022F\n\021update_breakpoint\022\027.idadebug" - ".DbgBreakpoint\032\026.google.protobuf.Empty\"\000" - "\022C\n\016del_breakpoint\022\027.idadebug.DbgBreakpo" - "int\032\026.google.protobuf.Empty\"\000\022E\n\021clear_b" - "reakpoints\022\026.google.protobuf.Empty\032\026.goo" - "gle.protobuf.Empty\"\000\0229\n\005pause\022\026.google.p" + "e/protobuf/empty.proto\032\036google/protobuf/" + "wrappers.proto\"*\n\005GpReg\022!\n\003reg\030\001 \001(\0162\024.i" + "dadebug.GpRegsEnum\"\354\001\n\006GpRegs\022\n\n\002D0\030\001 \001(" + "\r\022\n\n\002D1\030\002 \001(\r\022\n\n\002D2\030\003 \001(\r\022\n\n\002D3\030\004 \001(\r\022\n\n" + "\002D4\030\005 \001(\r\022\n\n\002D5\030\006 \001(\r\022\n\n\002D6\030\007 \001(\r\022\n\n\002D7\030" + "\010 \001(\r\022\n\n\002A0\030\t \001(\r\022\n\n\002A1\030\n \001(\r\022\n\n\002A2\030\013 \001(" + "\r\022\n\n\002A3\030\014 \001(\r\022\n\n\002A4\030\r \001(\r\022\n\n\002A5\030\016 \001(\r\022\n\n" + "\002A6\030\017 \001(\r\022\n\n\002A7\030\020 \001(\r\022\n\n\002PC\030\021 \001(\r\022\n\n\002SP\030" + "\022 \001(\r\022\n\n\002SR\030\023 \001(\r\"@\n\nGpRegValue\022#\n\005index" + "\030\001 \001(\0162\024.idadebug.GpRegsEnum\022\r\n\005value\030\002 " + "\001(\r\",\n\006VdpReg\022\"\n\003reg\030\001 \001(\0162\025.idadebug.Vd" + "pRegsEnum\"\301\002\n\007VdpRegs\022\013\n\003V00\030\001 \001(\r\022\013\n\003V0" + "1\030\002 \001(\r\022\013\n\003V02\030\003 \001(\r\022\013\n\003V03\030\004 \001(\r\022\013\n\003V04" + "\030\005 \001(\r\022\013\n\003V05\030\006 \001(\r\022\013\n\003V06\030\007 \001(\r\022\013\n\003V07\030" + "\010 \001(\r\022\013\n\003V08\030\t \001(\r\022\013\n\003V09\030\n \001(\r\022\013\n\003V0A\030\013" + " \001(\r\022\013\n\003V0B\030\014 \001(\r\022\013\n\003V0C\030\r \001(\r\022\013\n\003V0D\030\016 " + "\001(\r\022\013\n\003V0E\030\017 \001(\r\022\013\n\003V0F\030\020 \001(\r\022\013\n\003V10\030\021 \001" + "(\r\022\013\n\003V11\030\022 \001(\r\022\013\n\003V12\030\023 \001(\r\022\013\n\003V13\030\024 \001(" + "\r\022\013\n\003V14\030\025 \001(\r\022\013\n\003V15\030\026 \001(\r\022\013\n\003V16\030\027 \001(\r" + "\022\013\n\003V17\030\030 \001(\r\"B\n\013VdpRegValue\022$\n\005index\030\001 " + "\001(\0162\025.idadebug.VdpRegsEnum\022\r\n\005value\030\002 \001(" + "\r\"0\n\007DmaInfo\022\013\n\003len\030\001 \001(\r\022\013\n\003src\030\002 \001(\r\022\013" + "\n\003dst\030\003 \001(\r\")\n\010MemoryAS\022\017\n\007address\030\001 \001(\r" + "\022\014\n\004size\030\002 \001(\r\")\n\010MemoryAD\022\017\n\007address\030\001 " + "\001(\r\022\014\n\004data\030\002 \001(\014\"\220\001\n\rDbgBreakpoint\022\036\n\004t" + "ype\030\001 \001(\0162\020.idadebug.BpType\022\016\n\006bstart\030\002 " + "\001(\r\022\014\n\004bend\030\003 \001(\r\022\017\n\007enabled\030\004 \001(\010\022\016\n\006is" + "_vdp\030\005 \001(\010\022\r\n\005elang\030\006 \001(\r\022\021\n\tcondition\030\007" + " \001(\t\"7\n\016DbgBreakpoints\022%\n\004list\030\001 \003(\0132\027.i" + "dadebug.DbgBreakpoint\"\036\n\tCallstack\022\021\n\tca" + "llstack\030\001 \003(\r\"\034\n\013AnyRegValue\022\r\n\005value\030\001 " + "\001(\r\"\027\n\007MemData\022\014\n\004data\030\001 \001(\014\"\205\001\n\014PauseCh" + "anged\022\017\n\007address\030\001 \001(\r\0224\n\007changed\030\002 \003(\0132" + "#.idadebug.PauseChanged.ChangedEntry\032.\n\014" + "ChangedEntry\022\013\n\003key\030\001 \001(\r\022\r\n\005value\030\002 \001(\r" + ":\0028\001\"j\n\007Changed\022/\n\007changed\030\001 \003(\0132\036.idade" + "bug.Changed.ChangedEntry\032.\n\014ChangedEntry" + "\022\013\n\003key\030\001 \001(\r\022\r\n\005value\030\002 \001(\r:\0028\001\"-\n\tCond" + "ition\022\r\n\005elang\030\001 \001(\r\022\021\n\tcondition\030\002 \001(\t*" + "\244\001\n\nGpRegsEnum\022\006\n\002D0\020\000\022\006\n\002D1\020\001\022\006\n\002D2\020\002\022\006" + "\n\002D3\020\003\022\006\n\002D4\020\004\022\006\n\002D5\020\005\022\006\n\002D6\020\006\022\006\n\002D7\020\007\022\006" + "\n\002A0\020\010\022\006\n\002A1\020\n\022\006\n\002A2\020\014\022\006\n\002A3\020\016\022\006\n\002A4\020\020\022\006" + "\n\002A5\020\022\022\006\n\002A6\020\024\022\006\n\002A7\020\026\022\006\n\002PC\020\030\022\006\n\002SP\020\032\022\006" + "\n\002SR\020\034*\345\001\n\013VdpRegsEnum\022\007\n\003V00\020\000\022\007\n\003V01\020\001" + "\022\007\n\003V02\020\002\022\007\n\003V03\020\003\022\007\n\003V04\020\004\022\007\n\003V05\020\005\022\007\n\003" + "V06\020\006\022\007\n\003V07\020\007\022\007\n\003V08\020\010\022\007\n\003V09\020\t\022\007\n\003V0A\020" + "\n\022\007\n\003V0B\020\013\022\007\n\003V0C\020\014\022\007\n\003V0D\020\r\022\007\n\003V0E\020\016\022\007\n" + "\003V0F\020\017\022\007\n\003V10\020\020\022\007\n\003V11\020\021\022\007\n\003V12\020\022\022\007\n\003V13" + "\020\023\022\007\n\003V14\020\024\022\007\n\003V15\020\025\022\007\n\003V16\020\026\022\007\n\003V17\020\027*9" + "\n\006BpType\022\t\n\005DUMMY\020\000\022\t\n\005BP_PC\020\001\022\013\n\007BP_REA" + "D\020\002\022\014\n\010BP_WRITE\020\0032\214\013\n\tDbgServer\0226\n\nget_g" + "p_reg\022\017.idadebug.GpReg\032\025.idadebug.AnyReg" + "Value\"\000\0229\n\013get_gp_regs\022\026.google.protobuf" + ".Empty\032\020.idadebug.GpRegs\"\000\022<\n\nset_gp_reg" + "\022\024.idadebug.GpRegValue\032\026.google.protobuf" + ".Empty\"\000\0228\n\013get_vdp_reg\022\020.idadebug.VdpRe" + "g\032\025.idadebug.AnyRegValue\"\000\022;\n\014get_vdp_re" + "gs\022\026.google.protobuf.Empty\032\021.idadebug.Vd" + "pRegs\"\000\022>\n\013set_vdp_reg\022\025.idadebug.VdpReg" + "Value\032\026.google.protobuf.Empty\"\000\022;\n\014get_d" + "ma_info\022\026.google.protobuf.Empty\032\021.idadeb" + "ug.DmaInfo\"\000\0226\n\013read_memory\022\022.idadebug.M" + "emoryAS\032\021.idadebug.MemData\"\000\022<\n\014write_me" + "mory\022\022.idadebug.MemoryAD\032\026.google.protob" + "uf.Empty\"\000\022E\n\017get_breakpoints\022\026.google.p" + "rotobuf.Empty\032\030.idadebug.DbgBreakpoints\"" + "\000\022C\n\016add_breakpoint\022\027.idadebug.DbgBreakp" + "oint\032\026.google.protobuf.Empty\"\000\022F\n\021toggle" + "_breakpoint\022\027.idadebug.DbgBreakpoint\032\026.g" + "oogle.protobuf.Empty\"\000\022F\n\021update_breakpo" + "int\022\027.idadebug.DbgBreakpoint\032\026.google.pr" + "otobuf.Empty\"\000\022C\n\016del_breakpoint\022\027.idade" + "bug.DbgBreakpoint\032\026.google.protobuf.Empt" + "y\"\000\022E\n\021clear_breakpoints\022\026.google.protob" + "uf.Empty\032\026.google.protobuf.Empty\"\000\0229\n\005pa" + "use\022\026.google.protobuf.Empty\032\026.google.pro" + "tobuf.Empty\"\000\022:\n\006resume\022\026.google.protobu" + "f.Empty\032\026.google.protobuf.Empty\"\000\022C\n\017sta" + "rt_emulation\022\026.google.protobuf.Empty\032\026.g" + "oogle.protobuf.Empty\"\000\022B\n\016exit_emulation" + "\022\026.google.protobuf.Empty\032\026.google.protob" + "uf.Empty\"\000\022=\n\tstep_into\022\026.google.protobu" + "f.Empty\032\026.google.protobuf.Empty\"\000\022=\n\tste" + "p_over\022\026.google.protobuf.Empty\032\026.google." + "protobuf.Empty\"\000\022>\n\rget_callstack\022\026.goog" + "le.protobuf.Empty\032\023.idadebug.Callstack\"\000" + "2\215\002\n\tDbgClient\022\?\n\013start_event\022\026.google.p" "rotobuf.Empty\032\026.google.protobuf.Empty\"\000\022" - ":\n\006resume\022\026.google.protobuf.Empty\032\026.goog" - "le.protobuf.Empty\"\000\022C\n\017start_emulation\022\026" - ".google.protobuf.Empty\032\026.google.protobuf" - ".Empty\"\000\022B\n\016exit_emulation\022\026.google.prot" - "obuf.Empty\032\026.google.protobuf.Empty\"\000\022=\n\t" - "step_into\022\026.google.protobuf.Empty\032\026.goog" - "le.protobuf.Empty\"\000\022=\n\tstep_over\022\026.googl" - "e.protobuf.Empty\032\026.google.protobuf.Empty" - "\"\000\022>\n\rget_callstack\022\026.google.protobuf.Em" - "pty\032\023.idadebug.Callstack\"\0002\310\001\n\tDbgClient" - "\022\?\n\013start_event\022\026.google.protobuf.Empty\032" - "\026.google.protobuf.Empty\"\000\022\?\n\013pause_event" - "\022\026.idadebug.PauseChanged\032\026.google.protob" - "uf.Empty\"\000\0229\n\nstop_event\022\021.idadebug.Chan" - "ged\032\026.google.protobuf.Empty\"\000b\006proto3" + "\?\n\013pause_event\022\026.idadebug.PauseChanged\032\026" + ".google.protobuf.Empty\"\000\0229\n\nstop_event\022\021" + ".idadebug.Changed\032\026.google.protobuf.Empt" + "y\"\000\022C\n\016eval_condition\022\023.idadebug.Conditi" + "on\032\032.google.protobuf.BoolValue\"\000b\006proto3" ; -static const ::_pbi::DescriptorTable* const descriptor_table_debug_5fproto_5f68k_2eproto_deps[1] = { +static const ::_pbi::DescriptorTable* const descriptor_table_debug_5fproto_5f68k_2eproto_deps[2] = { &::descriptor_table_google_2fprotobuf_2fempty_2eproto, + &::descriptor_table_google_2fprotobuf_2fwrappers_2eproto, }; static ::_pbi::once_flag descriptor_table_debug_5fproto_5f68k_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_debug_5fproto_5f68k_2eproto = { - false, false, 3597, descriptor_table_protodef_debug_5fproto_5f68k_2eproto, + false, false, 3760, descriptor_table_protodef_debug_5fproto_5f68k_2eproto, "debug_proto_68k.proto", - &descriptor_table_debug_5fproto_5f68k_2eproto_once, descriptor_table_debug_5fproto_5f68k_2eproto_deps, 1, 18, + &descriptor_table_debug_5fproto_5f68k_2eproto_once, descriptor_table_debug_5fproto_5f68k_2eproto_deps, 2, 19, schemas, file_default_instances, TableStruct_debug_5fproto_5f68k_2eproto::offsets, file_level_metadata_debug_5fproto_5f68k_2eproto, file_level_enum_descriptors_debug_5fproto_5f68k_2eproto, file_level_service_descriptors_debug_5fproto_5f68k_2eproto, @@ -3595,18 +3626,27 @@ DbgBreakpoint::DbgBreakpoint(const DbgBreakpoint& from) : ::PROTOBUF_NAMESPACE_ID::Message() { DbgBreakpoint* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.type_){} + decltype(_impl_.condition_){} + , decltype(_impl_.type_){} , decltype(_impl_.bstart_){} , decltype(_impl_.bend_){} , decltype(_impl_.enabled_){} , decltype(_impl_.is_vdp_){} - , decltype(_impl_.is_forbid_){} + , decltype(_impl_.elang_){} , /*decltype(_impl_._cached_size_)*/{}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.condition_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.condition_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_condition().empty()) { + _this->_impl_.condition_.Set(from._internal_condition(), + _this->GetArenaForAllocation()); + } ::memcpy(&_impl_.type_, &from._impl_.type_, - static_cast(reinterpret_cast(&_impl_.is_forbid_) - - reinterpret_cast(&_impl_.type_)) + sizeof(_impl_.is_forbid_)); + static_cast(reinterpret_cast(&_impl_.elang_) - + reinterpret_cast(&_impl_.type_)) + sizeof(_impl_.elang_)); // @@protoc_insertion_point(copy_constructor:idadebug.DbgBreakpoint) } @@ -3615,14 +3655,19 @@ inline void DbgBreakpoint::SharedCtor( (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.type_){0} + decltype(_impl_.condition_){} + , decltype(_impl_.type_){0} , decltype(_impl_.bstart_){0u} , decltype(_impl_.bend_){0u} , decltype(_impl_.enabled_){false} , decltype(_impl_.is_vdp_){false} - , decltype(_impl_.is_forbid_){false} + , decltype(_impl_.elang_){0u} , /*decltype(_impl_._cached_size_)*/{} }; + _impl_.condition_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.condition_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING } DbgBreakpoint::~DbgBreakpoint() { @@ -3636,6 +3681,7 @@ DbgBreakpoint::~DbgBreakpoint() { inline void DbgBreakpoint::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.condition_.Destroy(); } void DbgBreakpoint::SetCachedSize(int size) const { @@ -3648,9 +3694,10 @@ void DbgBreakpoint::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; + _impl_.condition_.ClearToEmpty(); ::memset(&_impl_.type_, 0, static_cast( - reinterpret_cast(&_impl_.is_forbid_) - - reinterpret_cast(&_impl_.type_)) + sizeof(_impl_.is_forbid_)); + reinterpret_cast(&_impl_.elang_) - + reinterpret_cast(&_impl_.type_)) + sizeof(_impl_.elang_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -3701,11 +3748,21 @@ const char* DbgBreakpoint::_InternalParse(const char* ptr, ::_pbi::ParseContext* } else goto handle_unusual; continue; - // bool is_forbid = 6; + // uint32 elang = 6; case 6: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { - _impl_.is_forbid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _impl_.elang_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // string condition = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 58)) { + auto str = _internal_mutable_condition(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "idadebug.DbgBreakpoint.condition")); } else goto handle_unusual; continue; @@ -3769,10 +3826,20 @@ uint8_t* DbgBreakpoint::_InternalSerialize( target = ::_pbi::WireFormatLite::WriteBoolToArray(5, this->_internal_is_vdp(), target); } - // bool is_forbid = 6; - if (this->_internal_is_forbid() != 0) { + // uint32 elang = 6; + if (this->_internal_elang() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_is_forbid(), target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(6, this->_internal_elang(), target); + } + + // string condition = 7; + if (!this->_internal_condition().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_condition().data(), static_cast(this->_internal_condition().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "idadebug.DbgBreakpoint.condition"); + target = stream->WriteStringMaybeAliased( + 7, this->_internal_condition(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { @@ -3791,6 +3858,13 @@ size_t DbgBreakpoint::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; + // string condition = 7; + if (!this->_internal_condition().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_condition()); + } + // .idadebug.BpType type = 1; if (this->_internal_type() != 0) { total_size += 1 + @@ -3817,9 +3891,9 @@ size_t DbgBreakpoint::ByteSizeLong() const { total_size += 1 + 1; } - // bool is_forbid = 6; - if (this->_internal_is_forbid() != 0) { - total_size += 1 + 1; + // uint32 elang = 6; + if (this->_internal_elang() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_elang()); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); @@ -3840,6 +3914,9 @@ void DbgBreakpoint::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const :: uint32_t cached_has_bits = 0; (void) cached_has_bits; + if (!from._internal_condition().empty()) { + _this->_internal_set_condition(from._internal_condition()); + } if (from._internal_type() != 0) { _this->_internal_set_type(from._internal_type()); } @@ -3855,8 +3932,8 @@ void DbgBreakpoint::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const :: if (from._internal_is_vdp() != 0) { _this->_internal_set_is_vdp(from._internal_is_vdp()); } - if (from._internal_is_forbid() != 0) { - _this->_internal_set_is_forbid(from._internal_is_forbid()); + if (from._internal_elang() != 0) { + _this->_internal_set_elang(from._internal_elang()); } _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -3874,10 +3951,16 @@ bool DbgBreakpoint::IsInitialized() const { void DbgBreakpoint::InternalSwap(DbgBreakpoint* other) { using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.condition_, lhs_arena, + &other->_impl_.condition_, rhs_arena + ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(DbgBreakpoint, _impl_.is_forbid_) - + sizeof(DbgBreakpoint::_impl_.is_forbid_) + PROTOBUF_FIELD_OFFSET(DbgBreakpoint, _impl_.elang_) + + sizeof(DbgBreakpoint::_impl_.elang_) - PROTOBUF_FIELD_OFFSET(DbgBreakpoint, _impl_.type_)>( reinterpret_cast(&_impl_.type_), reinterpret_cast(&other->_impl_.type_)); @@ -5110,6 +5193,236 @@ ::PROTOBUF_NAMESPACE_ID::Metadata Changed::GetMetadata() const { file_level_metadata_debug_5fproto_5f68k_2eproto[17]); } +// =================================================================== + +class Condition::_Internal { + public: +}; + +Condition::Condition(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:idadebug.Condition) +} +Condition::Condition(const Condition& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + Condition* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.condition_){} + , decltype(_impl_.elang_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.condition_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.condition_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_condition().empty()) { + _this->_impl_.condition_.Set(from._internal_condition(), + _this->GetArenaForAllocation()); + } + _this->_impl_.elang_ = from._impl_.elang_; + // @@protoc_insertion_point(copy_constructor:idadebug.Condition) +} + +inline void Condition::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.condition_){} + , decltype(_impl_.elang_){0u} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.condition_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.condition_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +Condition::~Condition() { + // @@protoc_insertion_point(destructor:idadebug.Condition) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void Condition::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.condition_.Destroy(); +} + +void Condition::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void Condition::Clear() { +// @@protoc_insertion_point(message_clear_start:idadebug.Condition) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.condition_.ClearToEmpty(); + _impl_.elang_ = 0u; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Condition::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // uint32 elang = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _impl_.elang_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // string condition = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_condition(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "idadebug.Condition.condition")); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Condition::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:idadebug.Condition) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // uint32 elang = 1; + if (this->_internal_elang() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_elang(), target); + } + + // string condition = 2; + if (!this->_internal_condition().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_condition().data(), static_cast(this->_internal_condition().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "idadebug.Condition.condition"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_condition(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:idadebug.Condition) + return target; +} + +size_t Condition::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:idadebug.Condition) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string condition = 2; + if (!this->_internal_condition().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_condition()); + } + + // uint32 elang = 1; + if (this->_internal_elang() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_elang()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Condition::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + Condition::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Condition::GetClassData() const { return &_class_data_; } + + +void Condition::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:idadebug.Condition) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_condition().empty()) { + _this->_internal_set_condition(from._internal_condition()); + } + if (from._internal_elang() != 0) { + _this->_internal_set_elang(from._internal_elang()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void Condition::CopyFrom(const Condition& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:idadebug.Condition) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Condition::IsInitialized() const { + return true; +} + +void Condition::InternalSwap(Condition* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.condition_, lhs_arena, + &other->_impl_.condition_, rhs_arena + ); + swap(_impl_.elang_, other->_impl_.elang_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Condition::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_debug_5fproto_5f68k_2eproto_getter, &descriptor_table_debug_5fproto_5f68k_2eproto_once, + file_level_metadata_debug_5fproto_5f68k_2eproto[18]); +} + // @@protoc_insertion_point(namespace_scope) } // namespace idadebug PROTOBUF_NAMESPACE_OPEN @@ -5185,6 +5498,10 @@ template<> PROTOBUF_NOINLINE ::idadebug::Changed* Arena::CreateMaybeMessage< ::idadebug::Changed >(Arena* arena) { return Arena::CreateMessageInternal< ::idadebug::Changed >(arena); } +template<> PROTOBUF_NOINLINE ::idadebug::Condition* +Arena::CreateMaybeMessage< ::idadebug::Condition >(Arena* arena) { + return Arena::CreateMessageInternal< ::idadebug::Condition >(arena); +} PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) diff --git a/proto/debug_proto_68k.pb.h b/proto/debug_proto_68k.pb.h index 21101a9..1eed7a4 100644 --- a/proto/debug_proto_68k.pb.h +++ b/proto/debug_proto_68k.pb.h @@ -35,6 +35,7 @@ #include #include #include +#include // @@protoc_insertion_point(includes) #include #define PROTOBUF_INTERNAL_EXPORT_debug_5fproto_5f68k_2eproto @@ -62,6 +63,9 @@ extern ChangedDefaultTypeInternal _Changed_default_instance_; class Changed_ChangedEntry_DoNotUse; struct Changed_ChangedEntry_DoNotUseDefaultTypeInternal; extern Changed_ChangedEntry_DoNotUseDefaultTypeInternal _Changed_ChangedEntry_DoNotUse_default_instance_; +class Condition; +struct ConditionDefaultTypeInternal; +extern ConditionDefaultTypeInternal _Condition_default_instance_; class DbgBreakpoint; struct DbgBreakpointDefaultTypeInternal; extern DbgBreakpointDefaultTypeInternal _DbgBreakpoint_default_instance_; @@ -110,6 +114,7 @@ template<> ::idadebug::AnyRegValue* Arena::CreateMaybeMessage<::idadebug::AnyReg template<> ::idadebug::Callstack* Arena::CreateMaybeMessage<::idadebug::Callstack>(Arena*); template<> ::idadebug::Changed* Arena::CreateMaybeMessage<::idadebug::Changed>(Arena*); template<> ::idadebug::Changed_ChangedEntry_DoNotUse* Arena::CreateMaybeMessage<::idadebug::Changed_ChangedEntry_DoNotUse>(Arena*); +template<> ::idadebug::Condition* Arena::CreateMaybeMessage<::idadebug::Condition>(Arena*); template<> ::idadebug::DbgBreakpoint* Arena::CreateMaybeMessage<::idadebug::DbgBreakpoint>(Arena*); template<> ::idadebug::DbgBreakpoints* Arena::CreateMaybeMessage<::idadebug::DbgBreakpoints>(Arena*); template<> ::idadebug::DmaInfo* Arena::CreateMaybeMessage<::idadebug::DmaInfo>(Arena*); @@ -2220,13 +2225,28 @@ class DbgBreakpoint final : // accessors ------------------------------------------------------- enum : int { + kConditionFieldNumber = 7, kTypeFieldNumber = 1, kBstartFieldNumber = 2, kBendFieldNumber = 3, kEnabledFieldNumber = 4, kIsVdpFieldNumber = 5, - kIsForbidFieldNumber = 6, + kElangFieldNumber = 6, }; + // string condition = 7; + void clear_condition(); + const std::string& condition() const; + template + void set_condition(ArgT0&& arg0, ArgT... args); + std::string* mutable_condition(); + PROTOBUF_NODISCARD std::string* release_condition(); + void set_allocated_condition(std::string* condition); + private: + const std::string& _internal_condition() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_condition(const std::string& value); + std::string* _internal_mutable_condition(); + public: + // .idadebug.BpType type = 1; void clear_type(); ::idadebug::BpType type() const; @@ -2272,13 +2292,13 @@ class DbgBreakpoint final : void _internal_set_is_vdp(bool value); public: - // bool is_forbid = 6; - void clear_is_forbid(); - bool is_forbid() const; - void set_is_forbid(bool value); + // uint32 elang = 6; + void clear_elang(); + uint32_t elang() const; + void set_elang(uint32_t value); private: - bool _internal_is_forbid() const; - void _internal_set_is_forbid(bool value); + uint32_t _internal_elang() const; + void _internal_set_elang(uint32_t value); public: // @@protoc_insertion_point(class_scope:idadebug.DbgBreakpoint) @@ -2289,12 +2309,13 @@ class DbgBreakpoint final : typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr condition_; int type_; uint32_t bstart_; uint32_t bend_; bool enabled_; bool is_vdp_; - bool is_forbid_; + uint32_t elang_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; union { Impl_ _impl_; }; @@ -3305,6 +3326,170 @@ class Changed final : union { Impl_ _impl_; }; friend struct ::TableStruct_debug_5fproto_5f68k_2eproto; }; +// ------------------------------------------------------------------- + +class Condition final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:idadebug.Condition) */ { + public: + inline Condition() : Condition(nullptr) {} + ~Condition() override; + explicit PROTOBUF_CONSTEXPR Condition(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Condition(const Condition& from); + Condition(Condition&& from) noexcept + : Condition() { + *this = ::std::move(from); + } + + inline Condition& operator=(const Condition& from) { + CopyFrom(from); + return *this; + } + inline Condition& operator=(Condition&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Condition& default_instance() { + return *internal_default_instance(); + } + static inline const Condition* internal_default_instance() { + return reinterpret_cast( + &_Condition_default_instance_); + } + static constexpr int kIndexInFileMessages = + 18; + + friend void swap(Condition& a, Condition& b) { + a.Swap(&b); + } + inline void Swap(Condition* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Condition* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Condition* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const Condition& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const Condition& from) { + Condition::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Condition* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "idadebug.Condition"; + } + protected: + explicit Condition(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kConditionFieldNumber = 2, + kElangFieldNumber = 1, + }; + // string condition = 2; + void clear_condition(); + const std::string& condition() const; + template + void set_condition(ArgT0&& arg0, ArgT... args); + std::string* mutable_condition(); + PROTOBUF_NODISCARD std::string* release_condition(); + void set_allocated_condition(std::string* condition); + private: + const std::string& _internal_condition() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_condition(const std::string& value); + std::string* _internal_mutable_condition(); + public: + + // uint32 elang = 1; + void clear_elang(); + uint32_t elang() const; + void set_elang(uint32_t value); + private: + uint32_t _internal_elang() const; + void _internal_set_elang(uint32_t value); + public: + + // @@protoc_insertion_point(class_scope:idadebug.Condition) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr condition_; + uint32_t elang_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_debug_5fproto_5f68k_2eproto; +}; // =================================================================== @@ -4602,24 +4787,74 @@ inline void DbgBreakpoint::set_is_vdp(bool value) { // @@protoc_insertion_point(field_set:idadebug.DbgBreakpoint.is_vdp) } -// bool is_forbid = 6; -inline void DbgBreakpoint::clear_is_forbid() { - _impl_.is_forbid_ = false; +// uint32 elang = 6; +inline void DbgBreakpoint::clear_elang() { + _impl_.elang_ = 0u; } -inline bool DbgBreakpoint::_internal_is_forbid() const { - return _impl_.is_forbid_; +inline uint32_t DbgBreakpoint::_internal_elang() const { + return _impl_.elang_; } -inline bool DbgBreakpoint::is_forbid() const { - // @@protoc_insertion_point(field_get:idadebug.DbgBreakpoint.is_forbid) - return _internal_is_forbid(); +inline uint32_t DbgBreakpoint::elang() const { + // @@protoc_insertion_point(field_get:idadebug.DbgBreakpoint.elang) + return _internal_elang(); } -inline void DbgBreakpoint::_internal_set_is_forbid(bool value) { +inline void DbgBreakpoint::_internal_set_elang(uint32_t value) { - _impl_.is_forbid_ = value; + _impl_.elang_ = value; } -inline void DbgBreakpoint::set_is_forbid(bool value) { - _internal_set_is_forbid(value); - // @@protoc_insertion_point(field_set:idadebug.DbgBreakpoint.is_forbid) +inline void DbgBreakpoint::set_elang(uint32_t value) { + _internal_set_elang(value); + // @@protoc_insertion_point(field_set:idadebug.DbgBreakpoint.elang) +} + +// string condition = 7; +inline void DbgBreakpoint::clear_condition() { + _impl_.condition_.ClearToEmpty(); +} +inline const std::string& DbgBreakpoint::condition() const { + // @@protoc_insertion_point(field_get:idadebug.DbgBreakpoint.condition) + return _internal_condition(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DbgBreakpoint::set_condition(ArgT0&& arg0, ArgT... args) { + + _impl_.condition_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:idadebug.DbgBreakpoint.condition) +} +inline std::string* DbgBreakpoint::mutable_condition() { + std::string* _s = _internal_mutable_condition(); + // @@protoc_insertion_point(field_mutable:idadebug.DbgBreakpoint.condition) + return _s; +} +inline const std::string& DbgBreakpoint::_internal_condition() const { + return _impl_.condition_.Get(); +} +inline void DbgBreakpoint::_internal_set_condition(const std::string& value) { + + _impl_.condition_.Set(value, GetArenaForAllocation()); +} +inline std::string* DbgBreakpoint::_internal_mutable_condition() { + + return _impl_.condition_.Mutable(GetArenaForAllocation()); +} +inline std::string* DbgBreakpoint::release_condition() { + // @@protoc_insertion_point(field_release:idadebug.DbgBreakpoint.condition) + return _impl_.condition_.Release(); +} +inline void DbgBreakpoint::set_allocated_condition(std::string* condition) { + if (condition != nullptr) { + + } else { + + } + _impl_.condition_.SetAllocated(condition, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.condition_.IsDefault()) { + _impl_.condition_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:idadebug.DbgBreakpoint.condition) } // ------------------------------------------------------------------- @@ -4885,6 +5120,80 @@ Changed::mutable_changed() { return _internal_mutable_changed(); } +// ------------------------------------------------------------------- + +// Condition + +// uint32 elang = 1; +inline void Condition::clear_elang() { + _impl_.elang_ = 0u; +} +inline uint32_t Condition::_internal_elang() const { + return _impl_.elang_; +} +inline uint32_t Condition::elang() const { + // @@protoc_insertion_point(field_get:idadebug.Condition.elang) + return _internal_elang(); +} +inline void Condition::_internal_set_elang(uint32_t value) { + + _impl_.elang_ = value; +} +inline void Condition::set_elang(uint32_t value) { + _internal_set_elang(value); + // @@protoc_insertion_point(field_set:idadebug.Condition.elang) +} + +// string condition = 2; +inline void Condition::clear_condition() { + _impl_.condition_.ClearToEmpty(); +} +inline const std::string& Condition::condition() const { + // @@protoc_insertion_point(field_get:idadebug.Condition.condition) + return _internal_condition(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Condition::set_condition(ArgT0&& arg0, ArgT... args) { + + _impl_.condition_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:idadebug.Condition.condition) +} +inline std::string* Condition::mutable_condition() { + std::string* _s = _internal_mutable_condition(); + // @@protoc_insertion_point(field_mutable:idadebug.Condition.condition) + return _s; +} +inline const std::string& Condition::_internal_condition() const { + return _impl_.condition_.Get(); +} +inline void Condition::_internal_set_condition(const std::string& value) { + + _impl_.condition_.Set(value, GetArenaForAllocation()); +} +inline std::string* Condition::_internal_mutable_condition() { + + return _impl_.condition_.Mutable(GetArenaForAllocation()); +} +inline std::string* Condition::release_condition() { + // @@protoc_insertion_point(field_release:idadebug.Condition.condition) + return _impl_.condition_.Release(); +} +inline void Condition::set_allocated_condition(std::string* condition) { + if (condition != nullptr) { + + } else { + + } + _impl_.condition_.SetAllocated(condition, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.condition_.IsDefault()) { + _impl_.condition_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:idadebug.Condition.condition) +} + #ifdef __GNUC__ #pragma GCC diagnostic pop #endif // __GNUC__ @@ -4922,6 +5231,8 @@ Changed::mutable_changed() { // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) diff --git a/proto/debug_proto_68k.proto b/proto/debug_proto_68k.proto index e019b45..f25f93d 100644 --- a/proto/debug_proto_68k.proto +++ b/proto/debug_proto_68k.proto @@ -1,221 +1,229 @@ -syntax = "proto3"; - -package idadebug; - -import "google/protobuf/empty.proto"; - -enum GpRegsEnum { - D0 = 0; - D1 = 1; - D2 = 2; - D3 = 3; - D4 = 4; - D5 = 5; - D6 = 6; - D7 = 7; - - A0 = 8; - A1 = 10; - A2 = 12; - A3 = 14; - A4 = 16; - A5 = 18; - A6 = 20; - A7 = 22; - - PC = 24; - SP = 26; - SR = 28; -} - -message GpReg { - GpRegsEnum reg = 1; -} - -message GpRegs { - uint32 D0 = 1; - uint32 D1 = 2; - uint32 D2 = 3; - uint32 D3 = 4; - uint32 D4 = 5; - uint32 D5 = 6; - uint32 D6 = 7; - uint32 D7 = 8; - - uint32 A0 = 9; - uint32 A1 = 10; - uint32 A2 = 11; - uint32 A3 = 12; - uint32 A4 = 13; - uint32 A5 = 14; - uint32 A6 = 15; - uint32 A7 = 16; - - uint32 PC = 17; - uint32 SP = 18; - uint32 SR = 19; -} - -message GpRegValue { - GpRegsEnum index = 1; - uint32 value = 2; -} - -enum VdpRegsEnum { - V00 = 0; - V01 = 1; - V02 = 2; - V03 = 3; - V04 = 4; - V05 = 5; - V06 = 6; - V07 = 7; - V08 = 8; - V09 = 9; - V0A = 10; - V0B = 11; - V0C = 12; - V0D = 13; - V0E = 14; - V0F = 15; - V10 = 16; - V11 = 17; - V12 = 18; - V13 = 19; - V14 = 20; - V15 = 21; - V16 = 22; - V17 = 23; -} - -message VdpReg { - VdpRegsEnum reg = 1; -} - -message VdpRegs { - uint32 V00 = 1; - uint32 V01 = 2; - uint32 V02 = 3; - uint32 V03 = 4; - uint32 V04 = 5; - uint32 V05 = 6; - uint32 V06 = 7; - uint32 V07 = 8; - uint32 V08 = 9; - uint32 V09 = 10; - uint32 V0A = 11; - uint32 V0B = 12; - uint32 V0C = 13; - uint32 V0D = 14; - uint32 V0E = 15; - uint32 V0F = 16; - uint32 V10 = 17; - uint32 V11 = 18; - uint32 V12 = 19; - uint32 V13 = 20; - uint32 V14 = 21; - uint32 V15 = 22; - uint32 V16 = 23; - uint32 V17 = 24; -} - -message VdpRegValue { - VdpRegsEnum index = 1; - uint32 value = 2; -} - -message DmaInfo { - uint32 len = 1; - uint32 src = 2; - uint32 dst = 3; -} - -message MemoryAS { - uint32 address = 1; - uint32 size = 2; -} - -message MemoryAD { - uint32 address = 1; - bytes data = 2; -} - -enum BpType { - DUMMY = 0; - BP_PC = 1; - BP_READ = 2; - BP_WRITE = 3; -} - -message DbgBreakpoint { - BpType type = 1; - uint32 bstart = 2; - uint32 bend = 3; - bool enabled = 4; - bool is_vdp = 5; - bool is_forbid = 6; -} - -message DbgBreakpoints { - repeated DbgBreakpoint list = 1; -} - -message Callstack { - repeated uint32 callstack = 1; -} - -message AnyRegValue { - uint32 value = 1; -} - -message MemData { - bytes data = 1; -} - -service DbgServer { - - rpc get_gp_reg(GpReg) returns (AnyRegValue) {} - rpc get_gp_regs(google.protobuf.Empty) returns (GpRegs) {} - rpc set_gp_reg(GpRegValue) returns (google.protobuf.Empty) {} - - rpc get_vdp_reg(VdpReg) returns (AnyRegValue) {} - rpc get_vdp_regs(google.protobuf.Empty) returns (VdpRegs) {} - rpc set_vdp_reg(VdpRegValue) returns (google.protobuf.Empty) {} - - rpc get_dma_info(google.protobuf.Empty) returns (DmaInfo) {} - - rpc read_memory(MemoryAS) returns (MemData) {} - rpc write_memory(MemoryAD) returns (google.protobuf.Empty) {} - - rpc get_breakpoints(google.protobuf.Empty) returns (DbgBreakpoints) {} - rpc add_breakpoint(DbgBreakpoint) returns (google.protobuf.Empty) {} - rpc toggle_breakpoint(DbgBreakpoint) returns (google.protobuf.Empty) {} - rpc update_breakpoint(DbgBreakpoint) returns (google.protobuf.Empty) {} - rpc del_breakpoint(DbgBreakpoint) returns (google.protobuf.Empty) {} - rpc clear_breakpoints(google.protobuf.Empty) returns (google.protobuf.Empty) {} - - rpc pause(google.protobuf.Empty) returns (google.protobuf.Empty) {} - rpc resume(google.protobuf.Empty) returns (google.protobuf.Empty) {} - rpc start_emulation(google.protobuf.Empty) returns (google.protobuf.Empty) {} - rpc exit_emulation(google.protobuf.Empty) returns (google.protobuf.Empty) {} - - rpc step_into(google.protobuf.Empty) returns (google.protobuf.Empty) {} - rpc step_over(google.protobuf.Empty) returns (google.protobuf.Empty) {} - - rpc get_callstack(google.protobuf.Empty) returns (Callstack) {} -} - -message PauseChanged { - uint32 address = 1; - map changed = 2; -} - -message Changed { - map changed = 1; -} - -service DbgClient { - rpc start_event(google.protobuf.Empty) returns (google.protobuf.Empty) {} - rpc pause_event(PauseChanged) returns (google.protobuf.Empty) {} - rpc stop_event(Changed) returns (google.protobuf.Empty) {} -} +syntax = "proto3"; + +package idadebug; + +import "google/protobuf/empty.proto"; +import "google/protobuf/wrappers.proto"; + +enum GpRegsEnum { + D0 = 0; + D1 = 1; + D2 = 2; + D3 = 3; + D4 = 4; + D5 = 5; + D6 = 6; + D7 = 7; + + A0 = 8; + A1 = 10; + A2 = 12; + A3 = 14; + A4 = 16; + A5 = 18; + A6 = 20; + A7 = 22; + + PC = 24; + SP = 26; + SR = 28; +} + +message GpReg { + GpRegsEnum reg = 1; +} + +message GpRegs { + uint32 D0 = 1; + uint32 D1 = 2; + uint32 D2 = 3; + uint32 D3 = 4; + uint32 D4 = 5; + uint32 D5 = 6; + uint32 D6 = 7; + uint32 D7 = 8; + + uint32 A0 = 9; + uint32 A1 = 10; + uint32 A2 = 11; + uint32 A3 = 12; + uint32 A4 = 13; + uint32 A5 = 14; + uint32 A6 = 15; + uint32 A7 = 16; + + uint32 PC = 17; + uint32 SP = 18; + uint32 SR = 19; +} + +message GpRegValue { + GpRegsEnum index = 1; + uint32 value = 2; +} + +enum VdpRegsEnum { + V00 = 0; + V01 = 1; + V02 = 2; + V03 = 3; + V04 = 4; + V05 = 5; + V06 = 6; + V07 = 7; + V08 = 8; + V09 = 9; + V0A = 10; + V0B = 11; + V0C = 12; + V0D = 13; + V0E = 14; + V0F = 15; + V10 = 16; + V11 = 17; + V12 = 18; + V13 = 19; + V14 = 20; + V15 = 21; + V16 = 22; + V17 = 23; +} + +message VdpReg { + VdpRegsEnum reg = 1; +} + +message VdpRegs { + uint32 V00 = 1; + uint32 V01 = 2; + uint32 V02 = 3; + uint32 V03 = 4; + uint32 V04 = 5; + uint32 V05 = 6; + uint32 V06 = 7; + uint32 V07 = 8; + uint32 V08 = 9; + uint32 V09 = 10; + uint32 V0A = 11; + uint32 V0B = 12; + uint32 V0C = 13; + uint32 V0D = 14; + uint32 V0E = 15; + uint32 V0F = 16; + uint32 V10 = 17; + uint32 V11 = 18; + uint32 V12 = 19; + uint32 V13 = 20; + uint32 V14 = 21; + uint32 V15 = 22; + uint32 V16 = 23; + uint32 V17 = 24; +} + +message VdpRegValue { + VdpRegsEnum index = 1; + uint32 value = 2; +} + +message DmaInfo { + uint32 len = 1; + uint32 src = 2; + uint32 dst = 3; +} + +message MemoryAS { + uint32 address = 1; + uint32 size = 2; +} + +message MemoryAD { + uint32 address = 1; + bytes data = 2; +} + +enum BpType { + DUMMY = 0; + BP_PC = 1; + BP_READ = 2; + BP_WRITE = 3; +} + +message DbgBreakpoint { + BpType type = 1; + uint32 bstart = 2; + uint32 bend = 3; + bool enabled = 4; + bool is_vdp = 5; + uint32 elang = 6; + string condition = 7; +} + +message DbgBreakpoints { + repeated DbgBreakpoint list = 1; +} + +message Callstack { + repeated uint32 callstack = 1; +} + +message AnyRegValue { + uint32 value = 1; +} + +message MemData { + bytes data = 1; +} + +service DbgServer { + + rpc get_gp_reg(GpReg) returns (AnyRegValue) {} + rpc get_gp_regs(google.protobuf.Empty) returns (GpRegs) {} + rpc set_gp_reg(GpRegValue) returns (google.protobuf.Empty) {} + + rpc get_vdp_reg(VdpReg) returns (AnyRegValue) {} + rpc get_vdp_regs(google.protobuf.Empty) returns (VdpRegs) {} + rpc set_vdp_reg(VdpRegValue) returns (google.protobuf.Empty) {} + + rpc get_dma_info(google.protobuf.Empty) returns (DmaInfo) {} + + rpc read_memory(MemoryAS) returns (MemData) {} + rpc write_memory(MemoryAD) returns (google.protobuf.Empty) {} + + rpc get_breakpoints(google.protobuf.Empty) returns (DbgBreakpoints) {} + rpc add_breakpoint(DbgBreakpoint) returns (google.protobuf.Empty) {} + rpc toggle_breakpoint(DbgBreakpoint) returns (google.protobuf.Empty) {} + rpc update_breakpoint(DbgBreakpoint) returns (google.protobuf.Empty) {} + rpc del_breakpoint(DbgBreakpoint) returns (google.protobuf.Empty) {} + rpc clear_breakpoints(google.protobuf.Empty) returns (google.protobuf.Empty) {} + + rpc pause(google.protobuf.Empty) returns (google.protobuf.Empty) {} + rpc resume(google.protobuf.Empty) returns (google.protobuf.Empty) {} + rpc start_emulation(google.protobuf.Empty) returns (google.protobuf.Empty) {} + rpc exit_emulation(google.protobuf.Empty) returns (google.protobuf.Empty) {} + + rpc step_into(google.protobuf.Empty) returns (google.protobuf.Empty) {} + rpc step_over(google.protobuf.Empty) returns (google.protobuf.Empty) {} + + rpc get_callstack(google.protobuf.Empty) returns (Callstack) {} +} + +message PauseChanged { + uint32 address = 1; + map changed = 2; +} + +message Changed { + map changed = 1; +} + +message Condition { + uint32 elang = 1; + string condition = 2; +} + +service DbgClient { + rpc start_event(google.protobuf.Empty) returns (google.protobuf.Empty) {} + rpc pause_event(PauseChanged) returns (google.protobuf.Empty) {} + rpc stop_event(Changed) returns (google.protobuf.Empty) {} + rpc eval_condition(Condition) returns (google.protobuf.BoolValue) {} +} diff --git a/proto/debug_proto_z80.grpc.pb.cc b/proto/debug_proto_z80.grpc.pb.cc index b06bf2c..a977001 100644 --- a/proto/debug_proto_z80.grpc.pb.cc +++ b/proto/debug_proto_z80.grpc.pb.cc @@ -842,6 +842,7 @@ static const char* DbgClient_method_names[] = { "/idadebug.DbgClient/start_event", "/idadebug.DbgClient/pause_event", "/idadebug.DbgClient/stop_event", + "/idadebug.DbgClient/eval_condition", }; std::unique_ptr< DbgClient::Stub> DbgClient::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { @@ -854,6 +855,7 @@ DbgClient::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, : channel_(channel), rpcmethod_start_event_(DbgClient_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) , rpcmethod_pause_event_(DbgClient_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) , rpcmethod_stop_event_(DbgClient_method_names[2], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_eval_condition_(DbgClient_method_names[3], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) {} ::grpc::Status DbgClient::Stub::start_event(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::google::protobuf::Empty* response) { @@ -925,6 +927,29 @@ ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* DbgClient::Stub:: return result; } +::grpc::Status DbgClient::Stub::eval_condition(::grpc::ClientContext* context, const ::idadebug::Condition& request, ::google::protobuf::BoolValue* response) { + return ::grpc::internal::BlockingUnaryCall< ::idadebug::Condition, ::google::protobuf::BoolValue, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_eval_condition_, context, request, response); +} + +void DbgClient::Stub::async::eval_condition(::grpc::ClientContext* context, const ::idadebug::Condition* request, ::google::protobuf::BoolValue* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::idadebug::Condition, ::google::protobuf::BoolValue, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_eval_condition_, context, request, response, std::move(f)); +} + +void DbgClient::Stub::async::eval_condition(::grpc::ClientContext* context, const ::idadebug::Condition* request, ::google::protobuf::BoolValue* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_eval_condition_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::google::protobuf::BoolValue>* DbgClient::Stub::PrepareAsynceval_conditionRaw(::grpc::ClientContext* context, const ::idadebug::Condition& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::google::protobuf::BoolValue, ::idadebug::Condition, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_eval_condition_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::google::protobuf::BoolValue>* DbgClient::Stub::Asynceval_conditionRaw(::grpc::ClientContext* context, const ::idadebug::Condition& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsynceval_conditionRaw(context, request, cq); + result->StartCall(); + return result; +} + DbgClient::Service::Service() { AddMethod(new ::grpc::internal::RpcServiceMethod( DbgClient_method_names[0], @@ -956,6 +981,16 @@ DbgClient::Service::Service() { ::google::protobuf::Empty* resp) { return service->stop_event(ctx, req, resp); }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + DbgClient_method_names[3], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< DbgClient::Service, ::idadebug::Condition, ::google::protobuf::BoolValue, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](DbgClient::Service* service, + ::grpc::ServerContext* ctx, + const ::idadebug::Condition* req, + ::google::protobuf::BoolValue* resp) { + return service->eval_condition(ctx, req, resp); + }, this))); } DbgClient::Service::~Service() { @@ -982,6 +1017,13 @@ ::grpc::Status DbgClient::Service::stop_event(::grpc::ServerContext* context, co return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } +::grpc::Status DbgClient::Service::eval_condition(::grpc::ServerContext* context, const ::idadebug::Condition* request, ::google::protobuf::BoolValue* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + } // namespace idadebug diff --git a/proto/debug_proto_z80.grpc.pb.h b/proto/debug_proto_z80.grpc.pb.h index ea71a6c..bdfacb5 100644 --- a/proto/debug_proto_z80.grpc.pb.h +++ b/proto/debug_proto_z80.grpc.pb.h @@ -3089,6 +3089,13 @@ class DbgClient final { std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>> PrepareAsyncstop_event(::grpc::ClientContext* context, const ::idadebug::Changed& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>>(PrepareAsyncstop_eventRaw(context, request, cq)); } + virtual ::grpc::Status eval_condition(::grpc::ClientContext* context, const ::idadebug::Condition& request, ::google::protobuf::BoolValue* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::BoolValue>> Asynceval_condition(::grpc::ClientContext* context, const ::idadebug::Condition& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::BoolValue>>(Asynceval_conditionRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::BoolValue>> PrepareAsynceval_condition(::grpc::ClientContext* context, const ::idadebug::Condition& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::BoolValue>>(PrepareAsynceval_conditionRaw(context, request, cq)); + } class async_interface { public: virtual ~async_interface() {} @@ -3098,6 +3105,8 @@ class DbgClient final { virtual void pause_event(::grpc::ClientContext* context, const ::idadebug::PauseChanged* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) = 0; virtual void stop_event(::grpc::ClientContext* context, const ::idadebug::Changed* request, ::google::protobuf::Empty* response, std::function) = 0; virtual void stop_event(::grpc::ClientContext* context, const ::idadebug::Changed* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void eval_condition(::grpc::ClientContext* context, const ::idadebug::Condition* request, ::google::protobuf::BoolValue* response, std::function) = 0; + virtual void eval_condition(::grpc::ClientContext* context, const ::idadebug::Condition* request, ::google::protobuf::BoolValue* response, ::grpc::ClientUnaryReactor* reactor) = 0; }; typedef class async_interface experimental_async_interface; virtual class async_interface* async() { return nullptr; } @@ -3109,6 +3118,8 @@ class DbgClient final { virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>* PrepareAsyncpause_eventRaw(::grpc::ClientContext* context, const ::idadebug::PauseChanged& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>* Asyncstop_eventRaw(::grpc::ClientContext* context, const ::idadebug::Changed& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::Empty>* PrepareAsyncstop_eventRaw(::grpc::ClientContext* context, const ::idadebug::Changed& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::BoolValue>* Asynceval_conditionRaw(::grpc::ClientContext* context, const ::idadebug::Condition& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::google::protobuf::BoolValue>* PrepareAsynceval_conditionRaw(::grpc::ClientContext* context, const ::idadebug::Condition& request, ::grpc::CompletionQueue* cq) = 0; }; class Stub final : public StubInterface { public: @@ -3134,6 +3145,13 @@ class DbgClient final { std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>> PrepareAsyncstop_event(::grpc::ClientContext* context, const ::idadebug::Changed& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>>(PrepareAsyncstop_eventRaw(context, request, cq)); } + ::grpc::Status eval_condition(::grpc::ClientContext* context, const ::idadebug::Condition& request, ::google::protobuf::BoolValue* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::BoolValue>> Asynceval_condition(::grpc::ClientContext* context, const ::idadebug::Condition& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::BoolValue>>(Asynceval_conditionRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::BoolValue>> PrepareAsynceval_condition(::grpc::ClientContext* context, const ::idadebug::Condition& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::google::protobuf::BoolValue>>(PrepareAsynceval_conditionRaw(context, request, cq)); + } class async final : public StubInterface::async_interface { public: @@ -3143,6 +3161,8 @@ class DbgClient final { void pause_event(::grpc::ClientContext* context, const ::idadebug::PauseChanged* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) override; void stop_event(::grpc::ClientContext* context, const ::idadebug::Changed* request, ::google::protobuf::Empty* response, std::function) override; void stop_event(::grpc::ClientContext* context, const ::idadebug::Changed* request, ::google::protobuf::Empty* response, ::grpc::ClientUnaryReactor* reactor) override; + void eval_condition(::grpc::ClientContext* context, const ::idadebug::Condition* request, ::google::protobuf::BoolValue* response, std::function) override; + void eval_condition(::grpc::ClientContext* context, const ::idadebug::Condition* request, ::google::protobuf::BoolValue* response, ::grpc::ClientUnaryReactor* reactor) override; private: friend class Stub; explicit async(Stub* stub): stub_(stub) { } @@ -3160,9 +3180,12 @@ class DbgClient final { ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* PrepareAsyncpause_eventRaw(::grpc::ClientContext* context, const ::idadebug::PauseChanged& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* Asyncstop_eventRaw(::grpc::ClientContext* context, const ::idadebug::Changed& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::google::protobuf::Empty>* PrepareAsyncstop_eventRaw(::grpc::ClientContext* context, const ::idadebug::Changed& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::google::protobuf::BoolValue>* Asynceval_conditionRaw(::grpc::ClientContext* context, const ::idadebug::Condition& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::google::protobuf::BoolValue>* PrepareAsynceval_conditionRaw(::grpc::ClientContext* context, const ::idadebug::Condition& request, ::grpc::CompletionQueue* cq) override; const ::grpc::internal::RpcMethod rpcmethod_start_event_; const ::grpc::internal::RpcMethod rpcmethod_pause_event_; const ::grpc::internal::RpcMethod rpcmethod_stop_event_; + const ::grpc::internal::RpcMethod rpcmethod_eval_condition_; }; static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); @@ -3173,6 +3196,7 @@ class DbgClient final { virtual ::grpc::Status start_event(::grpc::ServerContext* context, const ::google::protobuf::Empty* request, ::google::protobuf::Empty* response); virtual ::grpc::Status pause_event(::grpc::ServerContext* context, const ::idadebug::PauseChanged* request, ::google::protobuf::Empty* response); virtual ::grpc::Status stop_event(::grpc::ServerContext* context, const ::idadebug::Changed* request, ::google::protobuf::Empty* response); + virtual ::grpc::Status eval_condition(::grpc::ServerContext* context, const ::idadebug::Condition* request, ::google::protobuf::BoolValue* response); }; template class WithAsyncMethod_start_event : public BaseClass { @@ -3234,7 +3258,27 @@ class DbgClient final { ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag); } }; - typedef WithAsyncMethod_start_event > > AsyncService; + template + class WithAsyncMethod_eval_condition : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_eval_condition() { + ::grpc::Service::MarkMethodAsync(3); + } + ~WithAsyncMethod_eval_condition() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status eval_condition(::grpc::ServerContext* /*context*/, const ::idadebug::Condition* /*request*/, ::google::protobuf::BoolValue* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void Requesteval_condition(::grpc::ServerContext* context, ::idadebug::Condition* request, ::grpc::ServerAsyncResponseWriter< ::google::protobuf::BoolValue>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(3, context, request, response, new_call_cq, notification_cq, tag); + } + }; + typedef WithAsyncMethod_start_event > > > AsyncService; template class WithCallbackMethod_start_event : public BaseClass { private: @@ -3316,7 +3360,34 @@ class DbgClient final { virtual ::grpc::ServerUnaryReactor* stop_event( ::grpc::CallbackServerContext* /*context*/, const ::idadebug::Changed* /*request*/, ::google::protobuf::Empty* /*response*/) { return nullptr; } }; - typedef WithCallbackMethod_start_event > > CallbackService; + template + class WithCallbackMethod_eval_condition : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_eval_condition() { + ::grpc::Service::MarkMethodCallback(3, + new ::grpc::internal::CallbackUnaryHandler< ::idadebug::Condition, ::google::protobuf::BoolValue>( + [this]( + ::grpc::CallbackServerContext* context, const ::idadebug::Condition* request, ::google::protobuf::BoolValue* response) { return this->eval_condition(context, request, response); }));} + void SetMessageAllocatorFor_eval_condition( + ::grpc::MessageAllocator< ::idadebug::Condition, ::google::protobuf::BoolValue>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(3); + static_cast<::grpc::internal::CallbackUnaryHandler< ::idadebug::Condition, ::google::protobuf::BoolValue>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_eval_condition() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status eval_condition(::grpc::ServerContext* /*context*/, const ::idadebug::Condition* /*request*/, ::google::protobuf::BoolValue* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* eval_condition( + ::grpc::CallbackServerContext* /*context*/, const ::idadebug::Condition* /*request*/, ::google::protobuf::BoolValue* /*response*/) { return nullptr; } + }; + typedef WithCallbackMethod_start_event > > > CallbackService; typedef CallbackService ExperimentalCallbackService; template class WithGenericMethod_start_event : public BaseClass { @@ -3370,6 +3441,23 @@ class DbgClient final { } }; template + class WithGenericMethod_eval_condition : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_eval_condition() { + ::grpc::Service::MarkMethodGeneric(3); + } + ~WithGenericMethod_eval_condition() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status eval_condition(::grpc::ServerContext* /*context*/, const ::idadebug::Condition* /*request*/, ::google::protobuf::BoolValue* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template class WithRawMethod_start_event : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} @@ -3430,6 +3518,26 @@ class DbgClient final { } }; template + class WithRawMethod_eval_condition : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_eval_condition() { + ::grpc::Service::MarkMethodRaw(3); + } + ~WithRawMethod_eval_condition() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status eval_condition(::grpc::ServerContext* /*context*/, const ::idadebug::Condition* /*request*/, ::google::protobuf::BoolValue* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void Requesteval_condition(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(3, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template class WithRawCallbackMethod_start_event : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} @@ -3496,6 +3604,28 @@ class DbgClient final { ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } }; template + class WithRawCallbackMethod_eval_condition : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_eval_condition() { + ::grpc::Service::MarkMethodRawCallback(3, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->eval_condition(context, request, response); })); + } + ~WithRawCallbackMethod_eval_condition() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status eval_condition(::grpc::ServerContext* /*context*/, const ::idadebug::Condition* /*request*/, ::google::protobuf::BoolValue* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* eval_condition( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template class WithStreamedUnaryMethod_start_event : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} @@ -3576,9 +3706,36 @@ class DbgClient final { // replace default version of method with streamed unary virtual ::grpc::Status Streamedstop_event(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::idadebug::Changed,::google::protobuf::Empty>* server_unary_streamer) = 0; }; - typedef WithStreamedUnaryMethod_start_event > > StreamedUnaryService; + template + class WithStreamedUnaryMethod_eval_condition : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_eval_condition() { + ::grpc::Service::MarkMethodStreamed(3, + new ::grpc::internal::StreamedUnaryHandler< + ::idadebug::Condition, ::google::protobuf::BoolValue>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::idadebug::Condition, ::google::protobuf::BoolValue>* streamer) { + return this->Streamedeval_condition(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_eval_condition() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status eval_condition(::grpc::ServerContext* /*context*/, const ::idadebug::Condition* /*request*/, ::google::protobuf::BoolValue* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status Streamedeval_condition(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::idadebug::Condition,::google::protobuf::BoolValue>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_start_event > > > StreamedUnaryService; typedef Service SplitStreamedService; - typedef WithStreamedUnaryMethod_start_event > > StreamedService; + typedef WithStreamedUnaryMethod_start_event > > > StreamedService; }; } // namespace idadebug diff --git a/proto/debug_proto_z80.pb.cc b/proto/debug_proto_z80.pb.cc index b468193..07047c4 100644 --- a/proto/debug_proto_z80.pb.cc +++ b/proto/debug_proto_z80.pb.cc @@ -116,11 +116,12 @@ struct MemoryADDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MemoryADDefaultTypeInternal _MemoryAD_default_instance_; PROTOBUF_CONSTEXPR DbgBreakpoint::DbgBreakpoint( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.type_)*/0 + /*decltype(_impl_.condition_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.type_)*/0 , /*decltype(_impl_.bstart_)*/0u , /*decltype(_impl_.bend_)*/0u , /*decltype(_impl_.enabled_)*/false - , /*decltype(_impl_.is_forbid_)*/false + , /*decltype(_impl_.elang_)*/0u , /*decltype(_impl_._cached_size_)*/{}} {} struct DbgBreakpointDefaultTypeInternal { PROTOBUF_CONSTEXPR DbgBreakpointDefaultTypeInternal() @@ -271,8 +272,22 @@ struct ChangedDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ChangedDefaultTypeInternal _Changed_default_instance_; +PROTOBUF_CONSTEXPR Condition::Condition( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.condition_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.elang_)*/0u + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ConditionDefaultTypeInternal { + PROTOBUF_CONSTEXPR ConditionDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ConditionDefaultTypeInternal() {} + union { + Condition _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ConditionDefaultTypeInternal _Condition_default_instance_; } // namespace idadebug -static ::_pb::Metadata file_level_metadata_debug_5fproto_5fz80_2eproto[17]; +static ::_pb::Metadata file_level_metadata_debug_5fproto_5fz80_2eproto[18]; static const ::_pb::EnumDescriptor* file_level_enum_descriptors_debug_5fproto_5fz80_2eproto[2]; static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_debug_5fproto_5fz80_2eproto = nullptr; @@ -350,7 +365,8 @@ const uint32_t TableStruct_debug_5fproto_5fz80_2eproto::offsets[] PROTOBUF_SECTI PROTOBUF_FIELD_OFFSET(::idadebug::DbgBreakpoint, _impl_.bstart_), PROTOBUF_FIELD_OFFSET(::idadebug::DbgBreakpoint, _impl_.bend_), PROTOBUF_FIELD_OFFSET(::idadebug::DbgBreakpoint, _impl_.enabled_), - PROTOBUF_FIELD_OFFSET(::idadebug::DbgBreakpoint, _impl_.is_forbid_), + PROTOBUF_FIELD_OFFSET(::idadebug::DbgBreakpoint, _impl_.elang_), + PROTOBUF_FIELD_OFFSET(::idadebug::DbgBreakpoint, _impl_.condition_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::idadebug::DbgBreakpoints, _internal_metadata_), ~0u, // no _extensions_ @@ -439,6 +455,14 @@ const uint32_t TableStruct_debug_5fproto_5fz80_2eproto::offsets[] PROTOBUF_SECTI ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::idadebug::Changed, _impl_.changed_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::idadebug::Condition, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::idadebug::Condition, _impl_.elang_), + PROTOBUF_FIELD_OFFSET(::idadebug::Condition, _impl_.condition_), }; static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, -1, sizeof(::idadebug::GpReg)}, @@ -447,17 +471,18 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode { 47, -1, -1, sizeof(::idadebug::MemoryAS)}, { 55, -1, -1, sizeof(::idadebug::MemoryAD)}, { 63, -1, -1, sizeof(::idadebug::DbgBreakpoint)}, - { 74, -1, -1, sizeof(::idadebug::DbgBreakpoints)}, - { 81, -1, -1, sizeof(::idadebug::Callstack)}, - { 88, -1, -1, sizeof(::idadebug::AnyRegValue)}, - { 95, -1, -1, sizeof(::idadebug::MemData)}, - { 102, -1, -1, sizeof(::idadebug::SoundBankRange)}, - { 110, 118, -1, sizeof(::idadebug::SoundBankMap_RangeEntry_DoNotUse)}, - { 120, -1, -1, sizeof(::idadebug::SoundBankMap)}, - { 127, 135, -1, sizeof(::idadebug::PauseChanged_ChangedEntry_DoNotUse)}, - { 137, -1, -1, sizeof(::idadebug::PauseChanged)}, - { 145, 153, -1, sizeof(::idadebug::Changed_ChangedEntry_DoNotUse)}, - { 155, -1, -1, sizeof(::idadebug::Changed)}, + { 75, -1, -1, sizeof(::idadebug::DbgBreakpoints)}, + { 82, -1, -1, sizeof(::idadebug::Callstack)}, + { 89, -1, -1, sizeof(::idadebug::AnyRegValue)}, + { 96, -1, -1, sizeof(::idadebug::MemData)}, + { 103, -1, -1, sizeof(::idadebug::SoundBankRange)}, + { 111, 119, -1, sizeof(::idadebug::SoundBankMap_RangeEntry_DoNotUse)}, + { 121, -1, -1, sizeof(::idadebug::SoundBankMap)}, + { 128, 136, -1, sizeof(::idadebug::PauseChanged_ChangedEntry_DoNotUse)}, + { 138, -1, -1, sizeof(::idadebug::PauseChanged)}, + { 146, 154, -1, sizeof(::idadebug::Changed_ChangedEntry_DoNotUse)}, + { 156, -1, -1, sizeof(::idadebug::Changed)}, + { 163, -1, -1, sizeof(::idadebug::Condition)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -478,94 +503,100 @@ static const ::_pb::Message* const file_default_instances[] = { &::idadebug::_PauseChanged_default_instance_._instance, &::idadebug::_Changed_ChangedEntry_DoNotUse_default_instance_._instance, &::idadebug::_Changed_default_instance_._instance, + &::idadebug::_Condition_default_instance_._instance, }; const char descriptor_table_protodef_debug_5fproto_5fz80_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n\025debug_proto_z80.proto\022\010idadebug\032\033googl" - "e/protobuf/empty.proto\"*\n\005GpReg\022!\n\003reg\030\001" - " \001(\0162\024.idadebug.GpRegsEnum\"\301\002\n\006GpRegs\022\n\n" - "\002AF\030\001 \001(\r\022\n\n\002BC\030\002 \001(\r\022\n\n\002DE\030\003 \001(\r\022\n\n\002HL\030" - "\004 \001(\r\022\n\n\002IX\030\005 \001(\r\022\n\n\002IY\030\006 \001(\r\022\t\n\001A\030\007 \001(\r" - "\022\t\n\001B\030\010 \001(\r\022\t\n\001C\030\t \001(\r\022\t\n\001D\030\n \001(\r\022\t\n\001E\030\013" - " \001(\r\022\t\n\001H\030\014 \001(\r\022\t\n\001L\030\r \001(\r\022\013\n\003IXH\030\016 \001(\r\022" - "\013\n\003IXL\030\017 \001(\r\022\013\n\003IYH\030\020 \001(\r\022\013\n\003IYL\030\021 \001(\r\022\013" - "\n\003AF2\030\022 \001(\r\022\013\n\003BC2\030\023 \001(\r\022\013\n\003DE2\030\024 \001(\r\022\013\n" - "\003HL2\030\025 \001(\r\022\t\n\001I\030\026 \001(\r\022\t\n\001R\030\027 \001(\r\022\n\n\002SP\030\030" - " \001(\r\022\n\n\002IP\030\031 \001(\r\022\014\n\004BANK\030\032 \001(\r\"@\n\nGpRegV" - "alue\022#\n\005index\030\001 \001(\0162\024.idadebug.GpRegsEnu" - "m\022\r\n\005value\030\002 \001(\r\")\n\010MemoryAS\022\017\n\007address\030" - "\001 \001(\r\022\014\n\004size\030\002 \001(\r\")\n\010MemoryAD\022\017\n\007addre" - "ss\030\001 \001(\r\022\014\n\004data\030\002 \001(\014\"q\n\rDbgBreakpoint\022" - "\036\n\004type\030\001 \001(\0162\020.idadebug.BpType\022\016\n\006bstar" - "t\030\002 \001(\r\022\014\n\004bend\030\003 \001(\r\022\017\n\007enabled\030\004 \001(\010\022\021" - "\n\tis_forbid\030\005 \001(\010\"7\n\016DbgBreakpoints\022%\n\004l" - "ist\030\001 \003(\0132\027.idadebug.DbgBreakpoint\"\036\n\tCa" - "llstack\022\021\n\tcallstack\030\001 \003(\r\"\034\n\013AnyRegValu" - "e\022\r\n\005value\030\001 \001(\r\"\027\n\007MemData\022\014\n\004data\030\001 \001(" - "\014\"4\n\016SoundBankRange\022\020\n\010bank_min\030\001 \001(\r\022\020\n" - "\010bank_max\030\002 \001(\r\"\210\001\n\014SoundBankMap\0220\n\005rang" - "e\030\001 \003(\0132!.idadebug.SoundBankMap.RangeEnt" - "ry\032F\n\nRangeEntry\022\013\n\003key\030\001 \001(\r\022\'\n\005value\030\002" - " \001(\0132\030.idadebug.SoundBankRange:\0028\001\"\205\001\n\014P" - "auseChanged\022\017\n\007address\030\001 \001(\r\0224\n\007changed\030" - "\002 \003(\0132#.idadebug.PauseChanged.ChangedEnt" - "ry\032.\n\014ChangedEntry\022\013\n\003key\030\001 \001(\r\022\r\n\005value" - "\030\002 \001(\r:\0028\001\"j\n\007Changed\022/\n\007changed\030\001 \003(\0132\036" - ".idadebug.Changed.ChangedEntry\032.\n\014Change" - "dEntry\022\013\n\003key\030\001 \001(\r\022\r\n\005value\030\002 \001(\r:\0028\001*\335" - "\001\n\nGpRegsEnum\022\006\n\002AF\020\000\022\006\n\002BC\020\001\022\006\n\002DE\020\002\022\006\n" - "\002HL\020\003\022\006\n\002IX\020\004\022\006\n\002IY\020\005\022\005\n\001A\020\006\022\005\n\001B\020\007\022\005\n\001C" - "\020\010\022\005\n\001D\020\t\022\005\n\001E\020\n\022\005\n\001H\020\013\022\005\n\001L\020\014\022\007\n\003IXH\020\r\022" - "\007\n\003IXL\020\016\022\007\n\003IYH\020\017\022\007\n\003IYL\020\020\022\007\n\003AF2\020\021\022\007\n\003B" - "C2\020\022\022\007\n\003DE2\020\023\022\007\n\003HL2\020\024\022\005\n\001I\020\025\022\005\n\001R\020\026\022\006\n\002" - "SP\020\027\022\006\n\002IP\020\030\022\010\n\004BANK\020\031*9\n\006BpType\022\t\n\005DUMM" - "Y\020\000\022\t\n\005BP_PC\020\001\022\013\n\007BP_READ\020\002\022\014\n\010BP_WRITE\020" - "\0032\335\t\n\tDbgServer\0226\n\nget_gp_reg\022\017.idadebug" - ".GpReg\032\025.idadebug.AnyRegValue\"\000\0229\n\013get_g" - "p_regs\022\026.google.protobuf.Empty\032\020.idadebu" - "g.GpRegs\"\000\022<\n\nset_gp_reg\022\024.idadebug.GpRe" - "gValue\032\026.google.protobuf.Empty\"\000\0226\n\013read" - "_memory\022\022.idadebug.MemoryAS\032\021.idadebug.M" - "emData\"\000\022<\n\014write_memory\022\022.idadebug.Memo" - "ryAD\032\026.google.protobuf.Empty\"\000\022E\n\017get_br" - "eakpoints\022\026.google.protobuf.Empty\032\030.idad" - "ebug.DbgBreakpoints\"\000\022C\n\016add_breakpoint\022" - "\027.idadebug.DbgBreakpoint\032\026.google.protob" - "uf.Empty\"\000\022F\n\021toggle_breakpoint\022\027.idadeb" - "ug.DbgBreakpoint\032\026.google.protobuf.Empty" - "\"\000\022F\n\021update_breakpoint\022\027.idadebug.DbgBr" - "eakpoint\032\026.google.protobuf.Empty\"\000\022C\n\016de" - "l_breakpoint\022\027.idadebug.DbgBreakpoint\032\026." - "google.protobuf.Empty\"\000\022E\n\021clear_breakpo" - "ints\022\026.google.protobuf.Empty\032\026.google.pr" - "otobuf.Empty\"\000\0229\n\005pause\022\026.google.protobu" - "f.Empty\032\026.google.protobuf.Empty\"\000\022:\n\006res" - "ume\022\026.google.protobuf.Empty\032\026.google.pro" - "tobuf.Empty\"\000\022C\n\017start_emulation\022\026.googl" - "e.protobuf.Empty\032\026.google.protobuf.Empty" - "\"\000\022B\n\016exit_emulation\022\026.google.protobuf.E" - "mpty\032\026.google.protobuf.Empty\"\000\022=\n\tstep_i" - "nto\022\026.google.protobuf.Empty\032\026.google.pro" - "tobuf.Empty\"\000\022=\n\tstep_over\022\026.google.prot" - "obuf.Empty\032\026.google.protobuf.Empty\"\000\022>\n\r" - "get_callstack\022\026.google.protobuf.Empty\032\023." - "idadebug.Callstack\"\000\022C\n\017get_sound_banks\022" - "\026.google.protobuf.Empty\032\026.idadebug.Sound" - "BankMap\"\0002\310\001\n\tDbgClient\022\?\n\013start_event\022\026" + "e/protobuf/empty.proto\032\036google/protobuf/" + "wrappers.proto\"*\n\005GpReg\022!\n\003reg\030\001 \001(\0162\024.i" + "dadebug.GpRegsEnum\"\301\002\n\006GpRegs\022\n\n\002AF\030\001 \001(" + "\r\022\n\n\002BC\030\002 \001(\r\022\n\n\002DE\030\003 \001(\r\022\n\n\002HL\030\004 \001(\r\022\n\n" + "\002IX\030\005 \001(\r\022\n\n\002IY\030\006 \001(\r\022\t\n\001A\030\007 \001(\r\022\t\n\001B\030\010 " + "\001(\r\022\t\n\001C\030\t \001(\r\022\t\n\001D\030\n \001(\r\022\t\n\001E\030\013 \001(\r\022\t\n\001" + "H\030\014 \001(\r\022\t\n\001L\030\r \001(\r\022\013\n\003IXH\030\016 \001(\r\022\013\n\003IXL\030\017" + " \001(\r\022\013\n\003IYH\030\020 \001(\r\022\013\n\003IYL\030\021 \001(\r\022\013\n\003AF2\030\022 " + "\001(\r\022\013\n\003BC2\030\023 \001(\r\022\013\n\003DE2\030\024 \001(\r\022\013\n\003HL2\030\025 \001" + "(\r\022\t\n\001I\030\026 \001(\r\022\t\n\001R\030\027 \001(\r\022\n\n\002SP\030\030 \001(\r\022\n\n\002" + "IP\030\031 \001(\r\022\014\n\004BANK\030\032 \001(\r\"@\n\nGpRegValue\022#\n\005" + "index\030\001 \001(\0162\024.idadebug.GpRegsEnum\022\r\n\005val" + "ue\030\002 \001(\r\")\n\010MemoryAS\022\017\n\007address\030\001 \001(\r\022\014\n" + "\004size\030\002 \001(\r\")\n\010MemoryAD\022\017\n\007address\030\001 \001(\r" + "\022\014\n\004data\030\002 \001(\014\"\200\001\n\rDbgBreakpoint\022\036\n\004type" + "\030\001 \001(\0162\020.idadebug.BpType\022\016\n\006bstart\030\002 \001(\r" + "\022\014\n\004bend\030\003 \001(\r\022\017\n\007enabled\030\004 \001(\010\022\r\n\005elang" + "\030\005 \001(\r\022\021\n\tcondition\030\006 \001(\t\"7\n\016DbgBreakpoi" + "nts\022%\n\004list\030\001 \003(\0132\027.idadebug.DbgBreakpoi" + "nt\"\036\n\tCallstack\022\021\n\tcallstack\030\001 \003(\r\"\034\n\013An" + "yRegValue\022\r\n\005value\030\001 \001(\r\"\027\n\007MemData\022\014\n\004d" + "ata\030\001 \001(\014\"4\n\016SoundBankRange\022\020\n\010bank_min\030" + "\001 \001(\r\022\020\n\010bank_max\030\002 \001(\r\"\210\001\n\014SoundBankMap" + "\0220\n\005range\030\001 \003(\0132!.idadebug.SoundBankMap." + "RangeEntry\032F\n\nRangeEntry\022\013\n\003key\030\001 \001(\r\022\'\n" + "\005value\030\002 \001(\0132\030.idadebug.SoundBankRange:\002" + "8\001\"\205\001\n\014PauseChanged\022\017\n\007address\030\001 \001(\r\0224\n\007" + "changed\030\002 \003(\0132#.idadebug.PauseChanged.Ch" + "angedEntry\032.\n\014ChangedEntry\022\013\n\003key\030\001 \001(\r\022" + "\r\n\005value\030\002 \001(\r:\0028\001\"j\n\007Changed\022/\n\007changed" + "\030\001 \003(\0132\036.idadebug.Changed.ChangedEntry\032." + "\n\014ChangedEntry\022\013\n\003key\030\001 \001(\r\022\r\n\005value\030\002 \001" + "(\r:\0028\001\"-\n\tCondition\022\r\n\005elang\030\001 \001(\r\022\021\n\tco" + "ndition\030\002 \001(\t*\335\001\n\nGpRegsEnum\022\006\n\002AF\020\000\022\006\n\002" + "BC\020\001\022\006\n\002DE\020\002\022\006\n\002HL\020\003\022\006\n\002IX\020\004\022\006\n\002IY\020\005\022\005\n\001" + "A\020\006\022\005\n\001B\020\007\022\005\n\001C\020\010\022\005\n\001D\020\t\022\005\n\001E\020\n\022\005\n\001H\020\013\022\005" + "\n\001L\020\014\022\007\n\003IXH\020\r\022\007\n\003IXL\020\016\022\007\n\003IYH\020\017\022\007\n\003IYL\020" + "\020\022\007\n\003AF2\020\021\022\007\n\003BC2\020\022\022\007\n\003DE2\020\023\022\007\n\003HL2\020\024\022\005\n" + "\001I\020\025\022\005\n\001R\020\026\022\006\n\002SP\020\027\022\006\n\002IP\020\030\022\010\n\004BANK\020\031*9\n" + "\006BpType\022\t\n\005DUMMY\020\000\022\t\n\005BP_PC\020\001\022\013\n\007BP_READ" + "\020\002\022\014\n\010BP_WRITE\020\0032\335\t\n\tDbgServer\0226\n\nget_gp" + "_reg\022\017.idadebug.GpReg\032\025.idadebug.AnyRegV" + "alue\"\000\0229\n\013get_gp_regs\022\026.google.protobuf." + "Empty\032\020.idadebug.GpRegs\"\000\022<\n\nset_gp_reg\022" + "\024.idadebug.GpRegValue\032\026.google.protobuf." + "Empty\"\000\0226\n\013read_memory\022\022.idadebug.Memory" + "AS\032\021.idadebug.MemData\"\000\022<\n\014write_memory\022" + "\022.idadebug.MemoryAD\032\026.google.protobuf.Em" + "pty\"\000\022E\n\017get_breakpoints\022\026.google.protob" + "uf.Empty\032\030.idadebug.DbgBreakpoints\"\000\022C\n\016" + "add_breakpoint\022\027.idadebug.DbgBreakpoint\032" + "\026.google.protobuf.Empty\"\000\022F\n\021toggle_brea" + "kpoint\022\027.idadebug.DbgBreakpoint\032\026.google" + ".protobuf.Empty\"\000\022F\n\021update_breakpoint\022\027" + ".idadebug.DbgBreakpoint\032\026.google.protobu" + "f.Empty\"\000\022C\n\016del_breakpoint\022\027.idadebug.D" + "bgBreakpoint\032\026.google.protobuf.Empty\"\000\022E" + "\n\021clear_breakpoints\022\026.google.protobuf.Em" + "pty\032\026.google.protobuf.Empty\"\000\0229\n\005pause\022\026" ".google.protobuf.Empty\032\026.google.protobuf" - ".Empty\"\000\022\?\n\013pause_event\022\026.idadebug.Pause" - "Changed\032\026.google.protobuf.Empty\"\000\0229\n\nsto" - "p_event\022\021.idadebug.Changed\032\026.google.prot" - "obuf.Empty\"\000b\006proto3" + ".Empty\"\000\022:\n\006resume\022\026.google.protobuf.Emp" + "ty\032\026.google.protobuf.Empty\"\000\022C\n\017start_em" + "ulation\022\026.google.protobuf.Empty\032\026.google" + ".protobuf.Empty\"\000\022B\n\016exit_emulation\022\026.go" + "ogle.protobuf.Empty\032\026.google.protobuf.Em" + "pty\"\000\022=\n\tstep_into\022\026.google.protobuf.Emp" + "ty\032\026.google.protobuf.Empty\"\000\022=\n\tstep_ove" + "r\022\026.google.protobuf.Empty\032\026.google.proto" + "buf.Empty\"\000\022>\n\rget_callstack\022\026.google.pr" + "otobuf.Empty\032\023.idadebug.Callstack\"\000\022C\n\017g" + "et_sound_banks\022\026.google.protobuf.Empty\032\026" + ".idadebug.SoundBankMap\"\0002\215\002\n\tDbgClient\022\?" + "\n\013start_event\022\026.google.protobuf.Empty\032\026." + "google.protobuf.Empty\"\000\022\?\n\013pause_event\022\026" + ".idadebug.PauseChanged\032\026.google.protobuf" + ".Empty\"\000\0229\n\nstop_event\022\021.idadebug.Change" + "d\032\026.google.protobuf.Empty\"\000\022C\n\016eval_cond" + "ition\022\023.idadebug.Condition\032\032.google.prot" + "obuf.BoolValue\"\000b\006proto3" ; -static const ::_pbi::DescriptorTable* const descriptor_table_debug_5fproto_5fz80_2eproto_deps[1] = { +static const ::_pbi::DescriptorTable* const descriptor_table_debug_5fproto_5fz80_2eproto_deps[2] = { &::descriptor_table_google_2fprotobuf_2fempty_2eproto, + &::descriptor_table_google_2fprotobuf_2fwrappers_2eproto, }; static ::_pbi::once_flag descriptor_table_debug_5fproto_5fz80_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_debug_5fproto_5fz80_2eproto = { - false, false, 3020, descriptor_table_protodef_debug_5fproto_5fz80_2eproto, + false, false, 3184, descriptor_table_protodef_debug_5fproto_5fz80_2eproto, "debug_proto_z80.proto", - &descriptor_table_debug_5fproto_5fz80_2eproto_once, descriptor_table_debug_5fproto_5fz80_2eproto_deps, 1, 17, + &descriptor_table_debug_5fproto_5fz80_2eproto_once, descriptor_table_debug_5fproto_5fz80_2eproto_deps, 2, 18, schemas, file_default_instances, TableStruct_debug_5fproto_5fz80_2eproto::offsets, file_level_metadata_debug_5fproto_5fz80_2eproto, file_level_enum_descriptors_debug_5fproto_5fz80_2eproto, file_level_service_descriptors_debug_5fproto_5fz80_2eproto, @@ -2288,17 +2319,26 @@ DbgBreakpoint::DbgBreakpoint(const DbgBreakpoint& from) : ::PROTOBUF_NAMESPACE_ID::Message() { DbgBreakpoint* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.type_){} + decltype(_impl_.condition_){} + , decltype(_impl_.type_){} , decltype(_impl_.bstart_){} , decltype(_impl_.bend_){} , decltype(_impl_.enabled_){} - , decltype(_impl_.is_forbid_){} + , decltype(_impl_.elang_){} , /*decltype(_impl_._cached_size_)*/{}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.condition_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.condition_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_condition().empty()) { + _this->_impl_.condition_.Set(from._internal_condition(), + _this->GetArenaForAllocation()); + } ::memcpy(&_impl_.type_, &from._impl_.type_, - static_cast(reinterpret_cast(&_impl_.is_forbid_) - - reinterpret_cast(&_impl_.type_)) + sizeof(_impl_.is_forbid_)); + static_cast(reinterpret_cast(&_impl_.elang_) - + reinterpret_cast(&_impl_.type_)) + sizeof(_impl_.elang_)); // @@protoc_insertion_point(copy_constructor:idadebug.DbgBreakpoint) } @@ -2307,13 +2347,18 @@ inline void DbgBreakpoint::SharedCtor( (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.type_){0} + decltype(_impl_.condition_){} + , decltype(_impl_.type_){0} , decltype(_impl_.bstart_){0u} , decltype(_impl_.bend_){0u} , decltype(_impl_.enabled_){false} - , decltype(_impl_.is_forbid_){false} + , decltype(_impl_.elang_){0u} , /*decltype(_impl_._cached_size_)*/{} }; + _impl_.condition_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.condition_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING } DbgBreakpoint::~DbgBreakpoint() { @@ -2327,6 +2372,7 @@ DbgBreakpoint::~DbgBreakpoint() { inline void DbgBreakpoint::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.condition_.Destroy(); } void DbgBreakpoint::SetCachedSize(int size) const { @@ -2339,9 +2385,10 @@ void DbgBreakpoint::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; + _impl_.condition_.ClearToEmpty(); ::memset(&_impl_.type_, 0, static_cast( - reinterpret_cast(&_impl_.is_forbid_) - - reinterpret_cast(&_impl_.type_)) + sizeof(_impl_.is_forbid_)); + reinterpret_cast(&_impl_.elang_) - + reinterpret_cast(&_impl_.type_)) + sizeof(_impl_.elang_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -2384,11 +2431,21 @@ const char* DbgBreakpoint::_InternalParse(const char* ptr, ::_pbi::ParseContext* } else goto handle_unusual; continue; - // bool is_forbid = 5; + // uint32 elang = 5; case 5: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { - _impl_.is_forbid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _impl_.elang_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // string condition = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { + auto str = _internal_mutable_condition(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "idadebug.DbgBreakpoint.condition")); } else goto handle_unusual; continue; @@ -2446,10 +2503,20 @@ uint8_t* DbgBreakpoint::_InternalSerialize( target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_enabled(), target); } - // bool is_forbid = 5; - if (this->_internal_is_forbid() != 0) { + // uint32 elang = 5; + if (this->_internal_elang() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(5, this->_internal_is_forbid(), target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(5, this->_internal_elang(), target); + } + + // string condition = 6; + if (!this->_internal_condition().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_condition().data(), static_cast(this->_internal_condition().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "idadebug.DbgBreakpoint.condition"); + target = stream->WriteStringMaybeAliased( + 6, this->_internal_condition(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { @@ -2468,6 +2535,13 @@ size_t DbgBreakpoint::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; + // string condition = 6; + if (!this->_internal_condition().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_condition()); + } + // .idadebug.BpType type = 1; if (this->_internal_type() != 0) { total_size += 1 + @@ -2489,9 +2563,9 @@ size_t DbgBreakpoint::ByteSizeLong() const { total_size += 1 + 1; } - // bool is_forbid = 5; - if (this->_internal_is_forbid() != 0) { - total_size += 1 + 1; + // uint32 elang = 5; + if (this->_internal_elang() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_elang()); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); @@ -2512,6 +2586,9 @@ void DbgBreakpoint::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const :: uint32_t cached_has_bits = 0; (void) cached_has_bits; + if (!from._internal_condition().empty()) { + _this->_internal_set_condition(from._internal_condition()); + } if (from._internal_type() != 0) { _this->_internal_set_type(from._internal_type()); } @@ -2524,8 +2601,8 @@ void DbgBreakpoint::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const :: if (from._internal_enabled() != 0) { _this->_internal_set_enabled(from._internal_enabled()); } - if (from._internal_is_forbid() != 0) { - _this->_internal_set_is_forbid(from._internal_is_forbid()); + if (from._internal_elang() != 0) { + _this->_internal_set_elang(from._internal_elang()); } _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -2543,10 +2620,16 @@ bool DbgBreakpoint::IsInitialized() const { void DbgBreakpoint::InternalSwap(DbgBreakpoint* other) { using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.condition_, lhs_arena, + &other->_impl_.condition_, rhs_arena + ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(DbgBreakpoint, _impl_.is_forbid_) - + sizeof(DbgBreakpoint::_impl_.is_forbid_) + PROTOBUF_FIELD_OFFSET(DbgBreakpoint, _impl_.elang_) + + sizeof(DbgBreakpoint::_impl_.elang_) - PROTOBUF_FIELD_OFFSET(DbgBreakpoint, _impl_.type_)>( reinterpret_cast(&_impl_.type_), reinterpret_cast(&other->_impl_.type_)); @@ -4210,6 +4293,236 @@ ::PROTOBUF_NAMESPACE_ID::Metadata Changed::GetMetadata() const { file_level_metadata_debug_5fproto_5fz80_2eproto[16]); } +// =================================================================== + +class Condition::_Internal { + public: +}; + +Condition::Condition(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:idadebug.Condition) +} +Condition::Condition(const Condition& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + Condition* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.condition_){} + , decltype(_impl_.elang_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.condition_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.condition_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_condition().empty()) { + _this->_impl_.condition_.Set(from._internal_condition(), + _this->GetArenaForAllocation()); + } + _this->_impl_.elang_ = from._impl_.elang_; + // @@protoc_insertion_point(copy_constructor:idadebug.Condition) +} + +inline void Condition::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.condition_){} + , decltype(_impl_.elang_){0u} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.condition_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.condition_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +Condition::~Condition() { + // @@protoc_insertion_point(destructor:idadebug.Condition) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void Condition::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.condition_.Destroy(); +} + +void Condition::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void Condition::Clear() { +// @@protoc_insertion_point(message_clear_start:idadebug.Condition) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.condition_.ClearToEmpty(); + _impl_.elang_ = 0u; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Condition::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // uint32 elang = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _impl_.elang_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // string condition = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_condition(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "idadebug.Condition.condition")); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Condition::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:idadebug.Condition) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // uint32 elang = 1; + if (this->_internal_elang() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_elang(), target); + } + + // string condition = 2; + if (!this->_internal_condition().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_condition().data(), static_cast(this->_internal_condition().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "idadebug.Condition.condition"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_condition(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:idadebug.Condition) + return target; +} + +size_t Condition::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:idadebug.Condition) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string condition = 2; + if (!this->_internal_condition().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_condition()); + } + + // uint32 elang = 1; + if (this->_internal_elang() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_elang()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Condition::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + Condition::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Condition::GetClassData() const { return &_class_data_; } + + +void Condition::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:idadebug.Condition) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_condition().empty()) { + _this->_internal_set_condition(from._internal_condition()); + } + if (from._internal_elang() != 0) { + _this->_internal_set_elang(from._internal_elang()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void Condition::CopyFrom(const Condition& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:idadebug.Condition) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Condition::IsInitialized() const { + return true; +} + +void Condition::InternalSwap(Condition* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.condition_, lhs_arena, + &other->_impl_.condition_, rhs_arena + ); + swap(_impl_.elang_, other->_impl_.elang_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Condition::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_debug_5fproto_5fz80_2eproto_getter, &descriptor_table_debug_5fproto_5fz80_2eproto_once, + file_level_metadata_debug_5fproto_5fz80_2eproto[17]); +} + // @@protoc_insertion_point(namespace_scope) } // namespace idadebug PROTOBUF_NAMESPACE_OPEN @@ -4281,6 +4594,10 @@ template<> PROTOBUF_NOINLINE ::idadebug::Changed* Arena::CreateMaybeMessage< ::idadebug::Changed >(Arena* arena) { return Arena::CreateMessageInternal< ::idadebug::Changed >(arena); } +template<> PROTOBUF_NOINLINE ::idadebug::Condition* +Arena::CreateMaybeMessage< ::idadebug::Condition >(Arena* arena) { + return Arena::CreateMessageInternal< ::idadebug::Condition >(arena); +} PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) diff --git a/proto/debug_proto_z80.pb.h b/proto/debug_proto_z80.pb.h index 296e1fb..b3828dd 100644 --- a/proto/debug_proto_z80.pb.h +++ b/proto/debug_proto_z80.pb.h @@ -35,6 +35,7 @@ #include #include #include +#include // @@protoc_insertion_point(includes) #include #define PROTOBUF_INTERNAL_EXPORT_debug_5fproto_5fz80_2eproto @@ -62,6 +63,9 @@ extern ChangedDefaultTypeInternal _Changed_default_instance_; class Changed_ChangedEntry_DoNotUse; struct Changed_ChangedEntry_DoNotUseDefaultTypeInternal; extern Changed_ChangedEntry_DoNotUseDefaultTypeInternal _Changed_ChangedEntry_DoNotUse_default_instance_; +class Condition; +struct ConditionDefaultTypeInternal; +extern ConditionDefaultTypeInternal _Condition_default_instance_; class DbgBreakpoint; struct DbgBreakpointDefaultTypeInternal; extern DbgBreakpointDefaultTypeInternal _DbgBreakpoint_default_instance_; @@ -107,6 +111,7 @@ template<> ::idadebug::AnyRegValue* Arena::CreateMaybeMessage<::idadebug::AnyReg template<> ::idadebug::Callstack* Arena::CreateMaybeMessage<::idadebug::Callstack>(Arena*); template<> ::idadebug::Changed* Arena::CreateMaybeMessage<::idadebug::Changed>(Arena*); template<> ::idadebug::Changed_ChangedEntry_DoNotUse* Arena::CreateMaybeMessage<::idadebug::Changed_ChangedEntry_DoNotUse>(Arena*); +template<> ::idadebug::Condition* Arena::CreateMaybeMessage<::idadebug::Condition>(Arena*); template<> ::idadebug::DbgBreakpoint* Arena::CreateMaybeMessage<::idadebug::DbgBreakpoint>(Arena*); template<> ::idadebug::DbgBreakpoints* Arena::CreateMaybeMessage<::idadebug::DbgBreakpoints>(Arena*); template<> ::idadebug::GpReg* Arena::CreateMaybeMessage<::idadebug::GpReg>(Arena*); @@ -1375,12 +1380,27 @@ class DbgBreakpoint final : // accessors ------------------------------------------------------- enum : int { + kConditionFieldNumber = 6, kTypeFieldNumber = 1, kBstartFieldNumber = 2, kBendFieldNumber = 3, kEnabledFieldNumber = 4, - kIsForbidFieldNumber = 5, + kElangFieldNumber = 5, }; + // string condition = 6; + void clear_condition(); + const std::string& condition() const; + template + void set_condition(ArgT0&& arg0, ArgT... args); + std::string* mutable_condition(); + PROTOBUF_NODISCARD std::string* release_condition(); + void set_allocated_condition(std::string* condition); + private: + const std::string& _internal_condition() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_condition(const std::string& value); + std::string* _internal_mutable_condition(); + public: + // .idadebug.BpType type = 1; void clear_type(); ::idadebug::BpType type() const; @@ -1417,13 +1437,13 @@ class DbgBreakpoint final : void _internal_set_enabled(bool value); public: - // bool is_forbid = 5; - void clear_is_forbid(); - bool is_forbid() const; - void set_is_forbid(bool value); + // uint32 elang = 5; + void clear_elang(); + uint32_t elang() const; + void set_elang(uint32_t value); private: - bool _internal_is_forbid() const; - void _internal_set_is_forbid(bool value); + uint32_t _internal_elang() const; + void _internal_set_elang(uint32_t value); public: // @@protoc_insertion_point(class_scope:idadebug.DbgBreakpoint) @@ -1434,11 +1454,12 @@ class DbgBreakpoint final : typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr condition_; int type_; uint32_t bstart_; uint32_t bend_; bool enabled_; - bool is_forbid_; + uint32_t elang_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; union { Impl_ _impl_; }; @@ -2795,6 +2816,170 @@ class Changed final : union { Impl_ _impl_; }; friend struct ::TableStruct_debug_5fproto_5fz80_2eproto; }; +// ------------------------------------------------------------------- + +class Condition final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:idadebug.Condition) */ { + public: + inline Condition() : Condition(nullptr) {} + ~Condition() override; + explicit PROTOBUF_CONSTEXPR Condition(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Condition(const Condition& from); + Condition(Condition&& from) noexcept + : Condition() { + *this = ::std::move(from); + } + + inline Condition& operator=(const Condition& from) { + CopyFrom(from); + return *this; + } + inline Condition& operator=(Condition&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Condition& default_instance() { + return *internal_default_instance(); + } + static inline const Condition* internal_default_instance() { + return reinterpret_cast( + &_Condition_default_instance_); + } + static constexpr int kIndexInFileMessages = + 17; + + friend void swap(Condition& a, Condition& b) { + a.Swap(&b); + } + inline void Swap(Condition* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Condition* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Condition* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const Condition& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const Condition& from) { + Condition::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Condition* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "idadebug.Condition"; + } + protected: + explicit Condition(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kConditionFieldNumber = 2, + kElangFieldNumber = 1, + }; + // string condition = 2; + void clear_condition(); + const std::string& condition() const; + template + void set_condition(ArgT0&& arg0, ArgT... args); + std::string* mutable_condition(); + PROTOBUF_NODISCARD std::string* release_condition(); + void set_allocated_condition(std::string* condition); + private: + const std::string& _internal_condition() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_condition(const std::string& value); + std::string* _internal_mutable_condition(); + public: + + // uint32 elang = 1; + void clear_elang(); + uint32_t elang() const; + void set_elang(uint32_t value); + private: + uint32_t _internal_elang() const; + void _internal_set_elang(uint32_t value); + public: + + // @@protoc_insertion_point(class_scope:idadebug.Condition) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr condition_; + uint32_t elang_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_debug_5fproto_5fz80_2eproto; +}; // =================================================================== @@ -3596,24 +3781,74 @@ inline void DbgBreakpoint::set_enabled(bool value) { // @@protoc_insertion_point(field_set:idadebug.DbgBreakpoint.enabled) } -// bool is_forbid = 5; -inline void DbgBreakpoint::clear_is_forbid() { - _impl_.is_forbid_ = false; +// uint32 elang = 5; +inline void DbgBreakpoint::clear_elang() { + _impl_.elang_ = 0u; } -inline bool DbgBreakpoint::_internal_is_forbid() const { - return _impl_.is_forbid_; +inline uint32_t DbgBreakpoint::_internal_elang() const { + return _impl_.elang_; } -inline bool DbgBreakpoint::is_forbid() const { - // @@protoc_insertion_point(field_get:idadebug.DbgBreakpoint.is_forbid) - return _internal_is_forbid(); +inline uint32_t DbgBreakpoint::elang() const { + // @@protoc_insertion_point(field_get:idadebug.DbgBreakpoint.elang) + return _internal_elang(); } -inline void DbgBreakpoint::_internal_set_is_forbid(bool value) { +inline void DbgBreakpoint::_internal_set_elang(uint32_t value) { - _impl_.is_forbid_ = value; + _impl_.elang_ = value; } -inline void DbgBreakpoint::set_is_forbid(bool value) { - _internal_set_is_forbid(value); - // @@protoc_insertion_point(field_set:idadebug.DbgBreakpoint.is_forbid) +inline void DbgBreakpoint::set_elang(uint32_t value) { + _internal_set_elang(value); + // @@protoc_insertion_point(field_set:idadebug.DbgBreakpoint.elang) +} + +// string condition = 6; +inline void DbgBreakpoint::clear_condition() { + _impl_.condition_.ClearToEmpty(); +} +inline const std::string& DbgBreakpoint::condition() const { + // @@protoc_insertion_point(field_get:idadebug.DbgBreakpoint.condition) + return _internal_condition(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DbgBreakpoint::set_condition(ArgT0&& arg0, ArgT... args) { + + _impl_.condition_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:idadebug.DbgBreakpoint.condition) +} +inline std::string* DbgBreakpoint::mutable_condition() { + std::string* _s = _internal_mutable_condition(); + // @@protoc_insertion_point(field_mutable:idadebug.DbgBreakpoint.condition) + return _s; +} +inline const std::string& DbgBreakpoint::_internal_condition() const { + return _impl_.condition_.Get(); +} +inline void DbgBreakpoint::_internal_set_condition(const std::string& value) { + + _impl_.condition_.Set(value, GetArenaForAllocation()); +} +inline std::string* DbgBreakpoint::_internal_mutable_condition() { + + return _impl_.condition_.Mutable(GetArenaForAllocation()); +} +inline std::string* DbgBreakpoint::release_condition() { + // @@protoc_insertion_point(field_release:idadebug.DbgBreakpoint.condition) + return _impl_.condition_.Release(); +} +inline void DbgBreakpoint::set_allocated_condition(std::string* condition) { + if (condition != nullptr) { + + } else { + + } + _impl_.condition_.SetAllocated(condition, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.condition_.IsDefault()) { + _impl_.condition_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:idadebug.DbgBreakpoint.condition) } // ------------------------------------------------------------------- @@ -3958,6 +4193,80 @@ Changed::mutable_changed() { return _internal_mutable_changed(); } +// ------------------------------------------------------------------- + +// Condition + +// uint32 elang = 1; +inline void Condition::clear_elang() { + _impl_.elang_ = 0u; +} +inline uint32_t Condition::_internal_elang() const { + return _impl_.elang_; +} +inline uint32_t Condition::elang() const { + // @@protoc_insertion_point(field_get:idadebug.Condition.elang) + return _internal_elang(); +} +inline void Condition::_internal_set_elang(uint32_t value) { + + _impl_.elang_ = value; +} +inline void Condition::set_elang(uint32_t value) { + _internal_set_elang(value); + // @@protoc_insertion_point(field_set:idadebug.Condition.elang) +} + +// string condition = 2; +inline void Condition::clear_condition() { + _impl_.condition_.ClearToEmpty(); +} +inline const std::string& Condition::condition() const { + // @@protoc_insertion_point(field_get:idadebug.Condition.condition) + return _internal_condition(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Condition::set_condition(ArgT0&& arg0, ArgT... args) { + + _impl_.condition_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:idadebug.Condition.condition) +} +inline std::string* Condition::mutable_condition() { + std::string* _s = _internal_mutable_condition(); + // @@protoc_insertion_point(field_mutable:idadebug.Condition.condition) + return _s; +} +inline const std::string& Condition::_internal_condition() const { + return _impl_.condition_.Get(); +} +inline void Condition::_internal_set_condition(const std::string& value) { + + _impl_.condition_.Set(value, GetArenaForAllocation()); +} +inline std::string* Condition::_internal_mutable_condition() { + + return _impl_.condition_.Mutable(GetArenaForAllocation()); +} +inline std::string* Condition::release_condition() { + // @@protoc_insertion_point(field_release:idadebug.Condition.condition) + return _impl_.condition_.Release(); +} +inline void Condition::set_allocated_condition(std::string* condition) { + if (condition != nullptr) { + + } else { + + } + _impl_.condition_.SetAllocated(condition, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.condition_.IsDefault()) { + _impl_.condition_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:idadebug.Condition.condition) +} + #ifdef __GNUC__ #pragma GCC diagnostic pop #endif // __GNUC__ @@ -3993,6 +4302,8 @@ Changed::mutable_changed() { // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) diff --git a/proto/debug_proto_z80.proto b/proto/debug_proto_z80.proto index c149af6..6d7506f 100644 --- a/proto/debug_proto_z80.proto +++ b/proto/debug_proto_z80.proto @@ -1,179 +1,187 @@ -syntax = "proto3"; - -package idadebug; - -import "google/protobuf/empty.proto"; - -enum GpRegsEnum { - AF = 0; - BC = 1; - DE = 2; - HL = 3; - - IX = 4; - IY = 5; - - A = 6; - B = 7; - C = 8; - D = 9; - E = 10; - H = 11; - L = 12; - - IXH = 13; - IXL = 14; - IYH = 15; - IYL = 16; - - AF2 = 17; - BC2 = 18; - DE2 = 19; - HL2 = 20; - - I = 21; - R = 22; - - SP = 23; - IP = 24; - - BANK = 25; -} - -message GpReg { - GpRegsEnum reg = 1; -} - -message GpRegs { - uint32 AF = 1; - uint32 BC = 2; - uint32 DE = 3; - uint32 HL = 4; - - uint32 IX = 5; - uint32 IY = 6; - - uint32 A = 7; - uint32 B = 8; - uint32 C = 9; - uint32 D = 10; - uint32 E = 11; - uint32 H = 12; - uint32 L = 13; - - uint32 IXH = 14; - uint32 IXL = 15; - uint32 IYH = 16; - uint32 IYL = 17; - - uint32 AF2 = 18; - uint32 BC2 = 19; - uint32 DE2 = 20; - uint32 HL2 = 21; - - uint32 I = 22; - uint32 R = 23; - - uint32 SP = 24; - uint32 IP = 25; - - uint32 BANK = 26; -} - -message GpRegValue { - GpRegsEnum index = 1; - uint32 value = 2; -} - -message MemoryAS { - uint32 address = 1; - uint32 size = 2; -} - -message MemoryAD { - uint32 address = 1; - bytes data = 2; -} - -enum BpType { - DUMMY = 0; - BP_PC = 1; - BP_READ = 2; - BP_WRITE = 3; -} - -message DbgBreakpoint { - BpType type = 1; - uint32 bstart = 2; - uint32 bend = 3; - bool enabled = 4; - bool is_forbid = 5; -} - -message DbgBreakpoints { - repeated DbgBreakpoint list = 1; -} - -message Callstack { - repeated uint32 callstack = 1; -} - -message AnyRegValue { - uint32 value = 1; -} - -message MemData { - bytes data = 1; -} - -message SoundBankRange { - uint32 bank_min = 1; - uint32 bank_max = 2; -} - -message SoundBankMap { - map range = 1; -} - -service DbgServer { - - rpc get_gp_reg(GpReg) returns (AnyRegValue) {} - rpc get_gp_regs(google.protobuf.Empty) returns (GpRegs) {} - rpc set_gp_reg(GpRegValue) returns (google.protobuf.Empty) {} - - rpc read_memory(MemoryAS) returns (MemData) {} - rpc write_memory(MemoryAD) returns (google.protobuf.Empty) {} - - rpc get_breakpoints(google.protobuf.Empty) returns (DbgBreakpoints) {} - rpc add_breakpoint(DbgBreakpoint) returns (google.protobuf.Empty) {} - rpc toggle_breakpoint(DbgBreakpoint) returns (google.protobuf.Empty) {} - rpc update_breakpoint(DbgBreakpoint) returns (google.protobuf.Empty) {} - rpc del_breakpoint(DbgBreakpoint) returns (google.protobuf.Empty) {} - rpc clear_breakpoints(google.protobuf.Empty) returns (google.protobuf.Empty) {} - - rpc pause(google.protobuf.Empty) returns (google.protobuf.Empty) {} - rpc resume(google.protobuf.Empty) returns (google.protobuf.Empty) {} - rpc start_emulation(google.protobuf.Empty) returns (google.protobuf.Empty) {} - rpc exit_emulation(google.protobuf.Empty) returns (google.protobuf.Empty) {} - - rpc step_into(google.protobuf.Empty) returns (google.protobuf.Empty) {} - rpc step_over(google.protobuf.Empty) returns (google.protobuf.Empty) {} - - rpc get_callstack(google.protobuf.Empty) returns (Callstack) {} - rpc get_sound_banks(google.protobuf.Empty) returns (SoundBankMap) {} -} - -message PauseChanged { - uint32 address = 1; - map changed = 2; -} - -message Changed { - map changed = 1; -} - -service DbgClient { - rpc start_event(google.protobuf.Empty) returns (google.protobuf.Empty) {} - rpc pause_event(PauseChanged) returns (google.protobuf.Empty) {} - rpc stop_event(Changed) returns (google.protobuf.Empty) {} -} +syntax = "proto3"; + +package idadebug; + +import "google/protobuf/empty.proto"; +import "google/protobuf/wrappers.proto"; + +enum GpRegsEnum { + AF = 0; + BC = 1; + DE = 2; + HL = 3; + + IX = 4; + IY = 5; + + A = 6; + B = 7; + C = 8; + D = 9; + E = 10; + H = 11; + L = 12; + + IXH = 13; + IXL = 14; + IYH = 15; + IYL = 16; + + AF2 = 17; + BC2 = 18; + DE2 = 19; + HL2 = 20; + + I = 21; + R = 22; + + SP = 23; + IP = 24; + + BANK = 25; +} + +message GpReg { + GpRegsEnum reg = 1; +} + +message GpRegs { + uint32 AF = 1; + uint32 BC = 2; + uint32 DE = 3; + uint32 HL = 4; + + uint32 IX = 5; + uint32 IY = 6; + + uint32 A = 7; + uint32 B = 8; + uint32 C = 9; + uint32 D = 10; + uint32 E = 11; + uint32 H = 12; + uint32 L = 13; + + uint32 IXH = 14; + uint32 IXL = 15; + uint32 IYH = 16; + uint32 IYL = 17; + + uint32 AF2 = 18; + uint32 BC2 = 19; + uint32 DE2 = 20; + uint32 HL2 = 21; + + uint32 I = 22; + uint32 R = 23; + + uint32 SP = 24; + uint32 IP = 25; + + uint32 BANK = 26; +} + +message GpRegValue { + GpRegsEnum index = 1; + uint32 value = 2; +} + +message MemoryAS { + uint32 address = 1; + uint32 size = 2; +} + +message MemoryAD { + uint32 address = 1; + bytes data = 2; +} + +enum BpType { + DUMMY = 0; + BP_PC = 1; + BP_READ = 2; + BP_WRITE = 3; +} + +message DbgBreakpoint { + BpType type = 1; + uint32 bstart = 2; + uint32 bend = 3; + bool enabled = 4; + uint32 elang = 5; + string condition = 6; +} + +message DbgBreakpoints { + repeated DbgBreakpoint list = 1; +} + +message Callstack { + repeated uint32 callstack = 1; +} + +message AnyRegValue { + uint32 value = 1; +} + +message MemData { + bytes data = 1; +} + +message SoundBankRange { + uint32 bank_min = 1; + uint32 bank_max = 2; +} + +message SoundBankMap { + map range = 1; +} + +service DbgServer { + + rpc get_gp_reg(GpReg) returns (AnyRegValue) {} + rpc get_gp_regs(google.protobuf.Empty) returns (GpRegs) {} + rpc set_gp_reg(GpRegValue) returns (google.protobuf.Empty) {} + + rpc read_memory(MemoryAS) returns (MemData) {} + rpc write_memory(MemoryAD) returns (google.protobuf.Empty) {} + + rpc get_breakpoints(google.protobuf.Empty) returns (DbgBreakpoints) {} + rpc add_breakpoint(DbgBreakpoint) returns (google.protobuf.Empty) {} + rpc toggle_breakpoint(DbgBreakpoint) returns (google.protobuf.Empty) {} + rpc update_breakpoint(DbgBreakpoint) returns (google.protobuf.Empty) {} + rpc del_breakpoint(DbgBreakpoint) returns (google.protobuf.Empty) {} + rpc clear_breakpoints(google.protobuf.Empty) returns (google.protobuf.Empty) {} + + rpc pause(google.protobuf.Empty) returns (google.protobuf.Empty) {} + rpc resume(google.protobuf.Empty) returns (google.protobuf.Empty) {} + rpc start_emulation(google.protobuf.Empty) returns (google.protobuf.Empty) {} + rpc exit_emulation(google.protobuf.Empty) returns (google.protobuf.Empty) {} + + rpc step_into(google.protobuf.Empty) returns (google.protobuf.Empty) {} + rpc step_over(google.protobuf.Empty) returns (google.protobuf.Empty) {} + + rpc get_callstack(google.protobuf.Empty) returns (Callstack) {} + rpc get_sound_banks(google.protobuf.Empty) returns (SoundBankMap) {} +} + +message PauseChanged { + uint32 address = 1; + map changed = 2; +} + +message Changed { + map changed = 1; +} + +message Condition { + uint32 elang = 1; + string condition = 2; +} + +service DbgClient { + rpc start_event(google.protobuf.Empty) returns (google.protobuf.Empty) {} + rpc pause_event(PauseChanged) returns (google.protobuf.Empty) {} + rpc stop_event(Changed) returns (google.protobuf.Empty) {} + rpc eval_condition(Condition) returns (google.protobuf.BoolValue) {} +}