mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-01 15:00:38 +00:00
Merge remote-tracking branch 'refs/remotes/origin/var-export' into var-export
This commit is contained in:
commit
0f8d345cb1
|
@ -21740,14 +21740,18 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){
|
||||||
|
|
||||||
void tcp_out(void *connection,void *offset,ptrszint bytes){
|
void tcp_out(void *connection,void *offset,ptrszint bytes){
|
||||||
#if !defined(DEPENDENCY_SOCKETS)
|
#if !defined(DEPENDENCY_SOCKETS)
|
||||||
#elif defined(QB64_WINDOWS) || defined(QB64_UNIX)
|
#elif defined(QB64_WINDOWS) || defined(QB64_UNIX)
|
||||||
|
// Handle Windows which might not have this flag (it would be a no-op anyway)
|
||||||
|
#if !defined(MSG_NOSIGNAL)
|
||||||
|
#define MSG_NOSIGNAL 0
|
||||||
|
#endif
|
||||||
tcp_connection *tcp; tcp=(tcp_connection*)connection;
|
tcp_connection *tcp; tcp=(tcp_connection*)connection;
|
||||||
int total = 0; // how many bytes we've sent
|
int total = 0; // how many bytes we've sent
|
||||||
int bytesleft = bytes; // how many we have left to send
|
int bytesleft = bytes; // how many we have left to send
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
while(total < bytes) {
|
while(total < bytes) {
|
||||||
n = send(tcp->socket, (char*)((char *)offset + total), bytesleft, 0);
|
n = send(tcp->socket, (char*)((char *)offset + total), bytesleft, MSG_NOSIGNAL);
|
||||||
if (n < 0) {
|
if (n < 0) {
|
||||||
tcp->connected = 0;
|
tcp->connected = 0;
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -218,7 +218,7 @@ SUB vwatch (globalVariables AS _OFFSET, localVariables AS _OFFSET)
|
||||||
vw_address = _OFFSET(globalVariables) + LEN(vw_address) * vw_localIndex
|
vw_address = _OFFSET(globalVariables) + LEN(vw_address) * vw_localIndex
|
||||||
vw_address = _MEMGET(vw_m, vw_address, _OFFSET) 'first resolve pass
|
vw_address = _MEMGET(vw_m, vw_address, _OFFSET) 'first resolve pass
|
||||||
vw_address = _MEMGET(vw_m, vw_address, _OFFSET) 'second resolve pass
|
vw_address = _MEMGET(vw_m, vw_address, _OFFSET) 'second resolve pass
|
||||||
vw_cmd$ = "global var:" + MKL$(vw_tempIndex) + STR$(vw_address)
|
vw_cmd$ = "global var:" + MKL$(vw_tempIndex) + _MK$(_OFFSET, vw_address)
|
||||||
GOSUB SendCommand
|
GOSUB SendCommand
|
||||||
CASE "local var"
|
CASE "local var"
|
||||||
vw_tempIndex = CVL(LEFT$(vw_value$, 4))
|
vw_tempIndex = CVL(LEFT$(vw_value$, 4))
|
||||||
|
@ -228,14 +228,14 @@ SUB vwatch (globalVariables AS _OFFSET, localVariables AS _OFFSET)
|
||||||
vw_address = _OFFSET(localVariables) + LEN(vw_address) * vw_localIndex
|
vw_address = _OFFSET(localVariables) + LEN(vw_address) * vw_localIndex
|
||||||
vw_address = _MEMGET(vw_m, vw_address, _OFFSET) 'first resolve pass
|
vw_address = _MEMGET(vw_m, vw_address, _OFFSET) 'first resolve pass
|
||||||
vw_address = _MEMGET(vw_m, vw_address, _OFFSET) 'second resolve pass
|
vw_address = _MEMGET(vw_m, vw_address, _OFFSET) 'second resolve pass
|
||||||
vw_cmd$ = "local var:" + MKL$(vw_tempIndex) + STR$(vw_address)
|
vw_cmd$ = "local var:" + MKL$(vw_tempIndex) + _MK$(_OFFSET, vw_address)
|
||||||
GOSUB SendCommand
|
GOSUB SendCommand
|
||||||
END IF
|
END IF
|
||||||
CASE "get address"
|
CASE "get address"
|
||||||
vw_tempIndex = CVL(LEFT$(vw_value$, 4))
|
vw_tempIndex = CVL(LEFT$(vw_value$, 4))
|
||||||
vw_sequence = CVI(MID$(vw_value$, 5, 2))
|
vw_sequence = CVI(MID$(vw_value$, 5, 2))
|
||||||
vw_varSize = CVL(MID$(vw_value$, 7, 4))
|
vw_varSize = CVL(MID$(vw_value$, 7, 4))
|
||||||
vw_address = VAL(MID$(vw_value$, 11))
|
vw_address = _CV(_OFFSET, MID$(vw_value$, 11))
|
||||||
vw_buf$ = SPACE$(vw_varSize)
|
vw_buf$ = SPACE$(vw_varSize)
|
||||||
vw_m = _MEM(vw_address, vw_varSize)
|
vw_m = _MEM(vw_address, vw_varSize)
|
||||||
vw_m2 = _MEM(_OFFSET(vw_buf$), vw_varSize)
|
vw_m2 = _MEM(_OFFSET(vw_buf$), vw_varSize)
|
||||||
|
|
|
@ -7296,7 +7296,7 @@ SUB DebugMode
|
||||||
END IF
|
END IF
|
||||||
CASE "global var", "local var"
|
CASE "global var", "local var"
|
||||||
tempIndex& = CVL(LEFT$(value$, 4))
|
tempIndex& = CVL(LEFT$(value$, 4))
|
||||||
address%& = VAL(MID$(value$, 5))
|
address%& = _CV(_OFFSET, MID$(value$, 5))
|
||||||
varType$ = usedVariableList(tempIndex&).varType
|
varType$ = usedVariableList(tempIndex&).varType
|
||||||
IF INSTR(varType$, "STRING *") THEN varType$ = "STRING"
|
IF INSTR(varType$, "STRING *") THEN varType$ = "STRING"
|
||||||
SELECT CASE varType$
|
SELECT CASE varType$
|
||||||
|
@ -7310,7 +7310,7 @@ SUB DebugMode
|
||||||
CASE "_OFFSET", "_UNSIGNED _OFFSET": varSize& = LEN(dummy%&)
|
CASE "_OFFSET", "_UNSIGNED _OFFSET": varSize& = LEN(dummy%&)
|
||||||
CASE "STRING": varSize& = LEN(dummy%&) + LEN(dummy&)
|
CASE "STRING": varSize& = LEN(dummy%&) + LEN(dummy&)
|
||||||
END SELECT
|
END SELECT
|
||||||
cmd$ = "get address:" + MKL$(tempIndex&) + MKI$(1) + MKL$(varSize&) + STR$(address%&)
|
cmd$ = "get address:" + MKL$(tempIndex&) + MKI$(1) + MKL$(varSize&) + _MK$(_OFFSET, address%&)
|
||||||
GOSUB SendCommand
|
GOSUB SendCommand
|
||||||
CASE "address read"
|
CASE "address read"
|
||||||
tempIndex& = CVL(LEFT$(value$, 4))
|
tempIndex& = CVL(LEFT$(value$, 4))
|
||||||
|
@ -7342,7 +7342,7 @@ SUB DebugMode
|
||||||
strLength& = CVL(MID$(recvData$, 5))
|
strLength& = CVL(MID$(recvData$, 5))
|
||||||
END IF
|
END IF
|
||||||
address$ = LEFT$(recvData$, LEN(dummy%&)) 'Pointer to data
|
address$ = LEFT$(recvData$, LEN(dummy%&)) 'Pointer to data
|
||||||
cmd$ = "get address:" + MKL$(tempIndex&) + MKI$(2) + MKL$(strLength&) + STR$(address%&)
|
cmd$ = "get address:" + MKL$(tempIndex&) + MKI$(2) + MKL$(strLength&) + _MK$(_OFFSET, address%&)
|
||||||
GOSUB SendCommand
|
GOSUB SendCommand
|
||||||
GOTO vwatch_string_seq1_done
|
GOTO vwatch_string_seq1_done
|
||||||
END IF
|
END IF
|
||||||
|
|
Loading…
Reference in a new issue