winIDEA SDK
set_bp_symbol_action.py
1# This script is licensed under BSD License, see file LICENSE.txt.
2#
3# (c) TASKING Germany GmbH, 2023
4
5"""
6This script is an addition to example test_set_bp_action.py.
7It sets a breakpoint at a symbol determined by script parameter.
8"""
9
10import argparse
11import isystem.connect as ic
12
13
14winidea_id = ''
15
16
17def set_bp_symbol(symbol: str):
18 conn_mgr = ic.ConnectionMgr()
19 conn_mgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
20
21 bp_ctrl = ic.CBreakpointController(conn_mgr)
22 bp_ctrl.set_BP_symbol(symbol)
23 print(f"Breakpoint set at symbol '{symbol}'.")
24
25
26if __name__ == "__main__":
27 parser = argparse.ArgumentParser()
28 parser.add_argument("symbol", type=str, help="Symbol at which the breakpoint will be set.")
29 args = parser.parse_args()
30
31 set_bp_symbol(args.symbol)