Debug Tutorial: How to Set a Breakpoint

Command syntax:
stop [ context ] [ in | at ] { line_num | procedure } [ ,count | if condition ]
stop [ context ] { rw | w } { expression | data_address } [ ,count | if condition ]
stopi [ context ] [ at ] text_address [ ,count | if condition ]
trace [ context ] [ in | at ] { line_num | procedure } [ ,count | if condition ]
tracei [ context ] [ at ] text_address [ ,count | if condition ]
delete [ context ] { all | bkpt_num }
status [ context ] [ >filename ]

Breakpoints force execution of a program to stop at points of interest to allow examination of data, registers, stack, and message queues.

A code breakpoint is placed on an instruction address. Execution is stopped before that instruction is executed. A data breakpoint, which is referred to here as a watchpoint, is placed on a data address. In this case, execution stops after that address has been accessed.


Examples:

(0) > stop 10
(0) > stop one
(0) > stop 25,2
(0) > stop -rw myvar if myvar < 0
(0) > stop -w one`i
(0) > status

( 1) stop at line 10:hello.c:one():(0) 
( 2) stop in one():hello.c:one():(0) 
( 3) stop at line 25:hello.c:main():(0) 
( 4) stop if access myvar:::(0) 
( 5) stop if write i:hello.c:one():(0) 
(0) > delete all

Intel Tutorial Notes Previous -- Next
Acknowledgement and Disclaimer