Support bounded machine instruction step counts in MCP

This commit is contained in:
Александр Петров
2026-09-17 23:22:37 +03:00
parent e8189b137a
commit 259c782190
13 changed files with 62 additions and 10 deletions
+4 -1
View File
@@ -406,8 +406,11 @@ class SessionController:
if method == 'step':
if self.running:
raise SessionError('CPU уже выполняется; сначала Pause')
count = arguments.get('count', 1)
if type(count) is not int or count < 1 or count > 64:
raise SessionError('Число машинных шагов должно быть 1..64')
self._control(arguments)
self.session.bridge.request('step')
self.session.bridge.request('step', count=count)
self.running = True
self._emit('continued', {'reason': 'step'})
location = self.session.where(self.session.bridge.wait_stopped())