[debugger enhance] don't block gdbserver thread while executing (#989)

Allow to set break point again when all break points are removed and
wasm app starts running.
This commit is contained in:
Xu Jun
2022-02-16 17:35:35 +08:00
committed by GitHub
parent 985dea9493
commit 3fe191b0df
14 changed files with 424 additions and 221 deletions

View File

@ -71,6 +71,22 @@ fail:
return BHT_ERROR;
}
int
os_socket_settimeout(bh_socket_t socket, uint64 timeout_us)
{
struct timeval tv;
tv.tv_sec = timeout_us / 1000000UL;
tv.tv_usec = timeout_us % 1000000UL;
if (setsockopt(socket, SOL_SOCKET, SO_RCVTIMEO, (const char *)&tv,
sizeof(tv))
!= 0) {
return BHT_ERROR;
}
return BHT_OK;
}
int
os_socket_listen(bh_socket_t socket, int max_client)
{