Update pvbemu

This commit is contained in:
2024-10-11 20:18:05 -04:00
parent 1b0d2d61b3
commit 062ea1c19a
3 changed files with 4 additions and 7 deletions
-1
View File
@@ -3,7 +3,6 @@ build:
@gcc main.c cmdbuf.c hex.c request.c response.c server.c pvbemu/core/vb.c \
-I include -I pvbemu/core \
-Werror -std=c90 -Wall -Wextra -Wpedantic \
-Wno-unused-parameter -Wno-unused-function \
-D _POSIX_C_SOURCE=199309L \
-o ./build/rdb
clean:
+1 -1
Submodule pvbemu updated: d4ae5f3909...5f563e6cac
+3 -5
View File
@@ -69,11 +69,9 @@ const uint32_t SYSTEM_REGISTERS[] = {
const uint32_t PC_INDEX = 32 + 13;
/* TODO: this should use userdata */
static void *SERVER_POINTER;
static int onExecute(VB *sim, uint32_t address, const uint16_t *code, int length) {
uint32_t i;
RdbServer *srv = SERVER_POINTER;
RdbServer *srv = (RdbServer *)vbGetUserData(sim);
(void)sim;
(void)code;
@@ -120,8 +118,8 @@ void rdbServerInit(RdbServer *srv, VB *sim) {
srv->running = false;
srv->brkslen = 0;
srv->stopreason = stop_reason_none;
SERVER_POINTER = srv;
vbSetCallback(sim, VB_EXECUTE, (void*)(uint64_t)&onExecute);
vbSetUserData(sim, srv);
vbSetExecuteCallback(sim, onExecute);
}
int rdbServerHandleCommand(RdbServer *srv, CommandBuf *cmd, RdbResponse *res) {