Add asynchronous machine over and out to shared MCP
This commit is contained in:
@@ -403,6 +403,22 @@ class SessionController:
|
||||
self.running = False
|
||||
self._emit('stopped', {'reason': 'pause', 'location': location})
|
||||
return location
|
||||
if method in ('step_over_instruction', 'step_out_instruction'):
|
||||
if self.running:
|
||||
raise SessionError('CPU уже выполняется; сначала Pause')
|
||||
command = {'step_over_instruction': 'step_over',
|
||||
'step_out_instruction': 'step_out'}[method]
|
||||
request_args = {}
|
||||
if method != 'step_out_instruction':
|
||||
count = arguments.get('count', 1)
|
||||
if type(count) is not int or count < 1 or count > 64:
|
||||
raise SessionError('Число машинных шагов должно быть 1..64')
|
||||
request_args['count'] = count
|
||||
self._control(arguments)
|
||||
self.session.bridge.request(command, **request_args)
|
||||
self.running = True
|
||||
self._emit('continued', {'reason': command})
|
||||
return {'accepted': True, 'command': command}
|
||||
if method == 'step':
|
||||
if self.running:
|
||||
raise SessionError('CPU уже выполняется; сначала Pause')
|
||||
@@ -643,7 +659,8 @@ RPC_MUTATIONS = frozenset({
|
||||
'claim_control', 'renew_control', 'release_control', 'input_key',
|
||||
'break_line', 'break_function', 'clear_breakpoint', 'clear_owned_breakpoints',
|
||||
'set_source_breakpoints', 'set_function_breakpoints',
|
||||
'continue', 'pause', 'step', 'source_step',
|
||||
'continue', 'pause', 'step', 'step_over_instruction',
|
||||
'step_out_instruction', 'source_step',
|
||||
})
|
||||
RPC_GENERATION_MUTATIONS = RPC_MUTATIONS - {
|
||||
'claim_control', 'renew_control', 'release_control',
|
||||
|
||||
Reference in New Issue
Block a user