Working with DeepSeek trying to get debugging working
This commit is contained in:
parent
c6abc564ff
commit
3a94ad3a01
1 changed files with 7 additions and 22 deletions
|
|
@ -236,29 +236,14 @@ export class ViceClient {
|
||||||
// Don't return - continue to check for pending requests
|
// Don't return - continue to check for pending requests
|
||||||
}
|
}
|
||||||
|
|
||||||
// VICE sends async events with ReqID=0xffffffff
|
// VICE sends unsolicited events with ReqID=0xffffffff.
|
||||||
// For these, we match by response type to the oldest pending request expecting that type
|
// These are state notifications (Stopped/Resumed) or auto-sent data on
|
||||||
|
// monitor entry (RegisterInfo). They must NOT be matched to pending
|
||||||
|
// requests by response type — doing so would consume the auto-sent
|
||||||
|
// RegisterInfo as the response to a pending getRegisters() call,
|
||||||
|
// returning the pre-breakpoint PC instead of the actual breakpoint PC.
|
||||||
if (response.requestId === 0xffffffff) {
|
if (response.requestId === 0xffffffff) {
|
||||||
// Find a pending request that expects this response type
|
debugLog(`Ignoring unsolicited event type 0x${response.responseType.toString(16)} (reqId=0xffffffff)`);
|
||||||
for (const [reqId, pending] of this.pendingRequests) {
|
|
||||||
if (pending.expectedResponseType === response.responseType) {
|
|
||||||
debugLog(`Matched async response type 0x${response.responseType.toString(16)} to request ${reqId}`);
|
|
||||||
this.pendingRequests.delete(reqId);
|
|
||||||
if (response.errorCode !== ErrorCode.Ok) {
|
|
||||||
pending.reject(
|
|
||||||
this.makeError(
|
|
||||||
`VICE_ERROR_${response.errorCode}`,
|
|
||||||
`VICE returned error code ${response.errorCode}`,
|
|
||||||
this.getErrorSuggestion(response.errorCode)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
pending.resolve(response);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
debugLog(`No pending request matched async response type 0x${response.responseType.toString(16)}`);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue