Support bounded machine instruction step counts in MCP
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user