Allow source debugger reconnection (#1667)

Allow to wait for a new debugger connection once the previous one
is disconnected:
- when receiving a detach command
- when the client socket is closed (for example, lldb process is killed)
This commit is contained in:
TianlongLiang
2022-11-02 17:12:34 +08:00
committed by GitHub
parent 5b144c491d
commit 3b4033aceb
6 changed files with 162 additions and 53 deletions

View File

@ -777,3 +777,13 @@ handle____request(WASMGDBServer *server, char *payload)
handle_free(server, args);
}
}
void
handle_detach_request(WASMGDBServer *server, char *payload)
{
if (payload != NULL) {
write_packet(server, "OK");
}
wasm_debug_instance_detach(
(WASMDebugInstance *)server->thread->debug_instance);
}