Break Setup Commands; Break(Set Software Pc Break); Tbreak(Set Temporary Software Pc Break)[Icd Mini / Sim] - Epson S5U1C17001C Manual

Cmos 16-bit single chip microcomputer, c compiler package for s1c17 family
Hide thumbs Also See for S5U1C17001C:
Table of Contents

Advertisement

10 DEBUggEr

10.7.8 Break Setup Commands

break
(set software PC break)
tbreak
(set temporary software PC break)
Operation
Sets a software PC breakpoint. This breakpoint can be set at up to 200 locations. If the PC matches the address
set during program execution, the program breaks before executing the instruction at that address. A breakpoint
can be set using a function name, line number, or address.
The break and tbreak commands are functionally the same. The following describes the difference:
break: The breakpoints set by break are not cleared by a break that occurs when the set point is reached
during program execution.
tbreak: The breakpoints set by tbreak are cleared by one occurrence of a break at the set point.
Format
break [ Breakpoint ]
tbreak [ Breakpoint ]
Breakpoint: Breakpoint
A breakpoint can be specified with one of the following:
• Function name
• Source file name:line number or line number only
• *Address (decimal, hexadecimal, or symbol)
When omitted, a breakpoint is set at the address displayed on the current PC.
Conditions: 0 ≤ address ≤ 0xfffffe
Usage example
n Example 1
(gdb) break main
Breakpoint 1 at 0xc0001e: file main.c, line 10.
(gdb) continue
Continuing.
Breakpoint 1, main () at main.c:10
A software PC breakpoint is set at the position specified using a function name.
When the target program is run, it breaks before executing the first C instruction (expanded to mnemonic) in
main(). The PC on which the program has stopped displays the start address of that instruction (i.e., address
of first mnemonic expanded).
n Example 2
(gdb) tbreak main.c:10
Breakpoint 1 at 0xc0001e: file main.c, line 10.
A temporary software PC breakpoint is set at the position specified with a line number. Although the breakpoint
here is specified in "source file name:line number" format when the breakpoint is to be set in the C source
containing the current PC address, it can be specified by simply using a line number like "tbreak 10". For
assembly sources, a source file name is always required.
If no instructions exist on the specified line with actual code (i.e., not expanded to mnemonic), a breakpoint is
set at the beginning of the first instruction encountered with actual code thereafter.
When the target program is run, it breaks before executing the C instruction on line 10 in main.c. The PC
on which the program has stopped displays the start address of that instruction (i.e., address of first mnemonic
expanded). If no instructions exist on line 10 with actual code, the program breaks at the beginning of the first
instruction encountered with actual code thereafter. Because the breakpoint is set by tbreak, it is cleared after
a break.
10-94
EPSOn
(C COMPilEr PaCkagE fOr S1C17 faMily) (Ver. 1.5.0)
[ICD Mini / SIM]
S5U1C17001C ManUal

Advertisement

Table of Contents
loading

Table of Contents