winIDEA SDK
Loading...
Searching...
No Matches
test_delete_bp.py
1# This script is licensed under BSD License, see file LICENSE.txt.
2# (c) TASKING Germany GmbH, 2023
3#
4# This Python script sets and then deletes breakpoints in three different ways:
5# by symbol name, by file name and line number, and by memory area and address.
6
7import isystem.connect as ic
8
9
10winidea_id = ''
11
12
13def test_deleteBP():
14 connMgr = ic.ConnectionMgr()
15 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
16
17 bpCtrl = ic.CBreakpointController(connMgr)
18 bpCtrl.setBP("main")
19 bpCtrl.deleteBP("main")
20 print("BP at 'main' is set and deleted (via symbol name).")
21
22 bpCtrl.setBP(215, "CORE0/startup.c")
23 bpCtrl.deleteBP("CORE0/startup.c", 215)
24 print("BP at line 215 in CORE0/startup.c is set and deleted (via file name and line number).")
25
26 bpCtrl.setBP(0, 0x20000400)
27 bpCtrl.deleteBP(0, 0x20000400)
28 print("BP at address 0x20000400 is set and deleted (via memory area and address).")
29
30
31if __name__ == "__main__":
32 test_deleteBP()