Expose owned C breakpoints through shared MCP session
This commit is contained in:
@@ -225,6 +225,12 @@ class ServerTests(unittest.TestCase):
|
||||
mine = controller.call('break_line',
|
||||
{'file': '/src/main.c', 'line': 3, 'owner': 'mcp:a'})
|
||||
other = controller.call('break_function', {'name': 'main', 'owner': 'mcp:b'})
|
||||
controller.breakpoint_info[mine['id']]['guard_conditions'] = ['PG3 == 0x12']
|
||||
listed = controller.call('list_breakpoints', {})['breakpoints']
|
||||
self.assertEqual([(item['id'], item['owner']) for item in listed],
|
||||
[(mine['id'], 'mcp:a'), (other['id'], 'mcp:b')])
|
||||
self.assertEqual(listed[0]['locations'][0]['link_address'], 0x8100)
|
||||
self.assertEqual(listed[0]['locations'][0]['bank_guard'], 'PG3 == 0x12')
|
||||
self.assertTrue(controller._has_stop_breakpoint(session.where()))
|
||||
with self.assertRaisesRegex(SessionError, 'не принадлежит'):
|
||||
controller.call('clear_breakpoint', {'id': other['id'], 'owner': 'mcp:a'})
|
||||
|
||||
Reference in New Issue
Block a user