Update pvbemu
This commit is contained in:
@@ -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
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user