add 'get-value' command

This commit is contained in:
MihailRis
2025-10-08 21:35:37 +03:00
parent aa42fb1e39
commit 8f56969997
6 changed files with 195 additions and 69 deletions
+13 -1
View File
@@ -43,6 +43,7 @@ namespace devtools {
STEP,
STEP_INTO_FUNCTION,
RESUME,
GET_VALUE,
};
struct BreakpointEventDto {
@@ -53,9 +54,17 @@ namespace devtools {
struct SignalEventDto {
};
using ValuePath = std::vector<std::variant<std::string, int>>;
struct GetValueEventDto {
int frame;
int localIndex;
ValuePath path;
};
struct DebuggingEvent {
DebuggingEventType type;
std::variant<BreakpointEventDto, SignalEventDto> data;
std::variant<BreakpointEventDto, SignalEventDto, GetValueEventDto> data;
};
class DebuggingServer {
@@ -65,6 +74,9 @@ namespace devtools {
bool update();
void onHitBreakpoint(dv::value&& stackTrace);
void pause();
void sendValue(dv::value&& value, int frame, int local, ValuePath&& path);
void setClient(u64id_t client);
std::vector<DebuggingEvent> pullEvents();