winIDEA SDK
test_remove_bps.py
1# This script is licensed under BSD License, see file LICENSE.txt.
2#
3# (c) TASKING Germany GmbH, 2023
4
5import isystem.connect as ic
6
7
8winidea_id = ''
9
10
11def test_remove_bps():
12 conn_mgr = ic.ConnectionMgr()
13 conn_mgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
14
15 bp_ctrl = ic.CBreakpointController(conn_mgr)
16 bp_ctrl.set_BP_symbol("main")
17 bp_handle_1 = bp_ctrl.set_BP_symbol("target_init")
18 bp_handle_2 = bp_ctrl.set_BP_symbol("init_globals")
19
20 bps_to_remove = ic.VBPInstances()
21 bps_to_remove.append(bp_handle_1)
22 bps_to_remove.append(bp_handle_2)
23
24 bp_ctrl.remove_BPs(bps_to_remove)
25 print(f"Breakpoints at functions 'target_init' and 'init_globals' removed.")
26
27
28if __name__ == "__main__":
29 test_remove_bps()