mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
add 'set-breakpoint', 'remove-breakpoint' commands
This commit is contained in:
parent
95f30da49b
commit
5972bc769b
6 changed files with 114 additions and 2 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "typedefs.hpp"
|
||||
|
||||
|
|
@ -35,6 +36,16 @@ namespace devtools {
|
|||
u64id_t connection;
|
||||
};
|
||||
|
||||
enum class BreakpointEventType {
|
||||
SET_BREAKPOINT = 1,
|
||||
REMOVE_BREAKPOINT,
|
||||
};
|
||||
struct BreakpointEvent {
|
||||
BreakpointEventType type;
|
||||
std::string source;
|
||||
int line;
|
||||
};
|
||||
|
||||
class DebuggingServer {
|
||||
public:
|
||||
DebuggingServer(Engine& engine, const std::string& serverString);
|
||||
|
|
@ -44,10 +55,12 @@ namespace devtools {
|
|||
void onHitBreakpoint(dv::value&& stackTrace);
|
||||
|
||||
void setClient(u64id_t client);
|
||||
std::vector<BreakpointEvent> pullBreakpointEvents();
|
||||
private:
|
||||
Engine& engine;
|
||||
network::Server& server;
|
||||
std::unique_ptr<ClientConnection> connection;
|
||||
std::vector<BreakpointEvent> breakpointEvents;
|
||||
|
||||
bool performCommand(const std::string& type, const dv::value& map);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue