10-98
EPSOn
S5U1C17001C ManUal
(C COMPilEr PaCkagE fOr S1C17 faMily) (Ver. 1.5.0)
10 DEBUggEr
n
Example 2
(gdb)
thbreak main.c:10
Hardware assisted breakpoint 1 at 0xc0001e: file main.c, line 10.
A temporary hardware 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 "
thbreak
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 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
thbreak
, it is cleared
after a break.
n
Example 3
(gdb)
hbreak *0xc0001e
Note: breakpoint 1 also set at pc 0xc0001e.
Hardware assisted breakpoint 2 at 0xc0001e: file main.c, line 10.
A hardware PC breakpoint is set at the position specified using an address.
When the target program is run, it breaks before executing the instruction at that address. A symbol can also be
used, as shown below.
(gdb)
thbreak *main
Hardware assisted breakpoint 3 at 0xc0001c: file main.c, line 7.
Note that adding an asterisk (
*
) causes even a function name to be regarded as an address.
Breakpoint management
The breakpoints you set are sequentially assigned break numbers beginning with 1, regardless of which
types of breaks you set, and are displayed as a message in the [Console] window when you execute a break
setup command. (See the examples above.) These numbers are required when you disable/enable or delete
breakpoints individually at a later time. Even when you delete breakpoints, the breakpoint numbers are not
moved up (to reuse deleted numbers) until after you quit the debugger.
To manipulate the breakpoints you set, use the following commands:
disable
:
Disables a breakpoint.
enable
:
Enables a breakpoint.
delete
or
clear
:
Deletes a breakpoint.
ignore
:
Specifies the number of times a break is disabled.
info breakpoints
: Displays a list of breakpoints.
For details, see the description of each command.
GUI
A hardware PC breakpoint can also be set by following the procedure below.
1. Display the source file in which you wish to set a breakpoint in the [Source] window. To set a breakpoint at
an address, display the file in ASSEMBLY or MIX mode.
2. The lines at which breakpoints can be set are marked by a bar "–" at the beginning of the line. Move the
cursor near the beginning of a line at which you wish to set a breakpoint. The cursor will change shape
to a circle (white ). Right-click there to display a popup menu, allowing you to choose [Set Hardware
Breakpoint]. The "–" mark at the beginning of the line will change to
n
(in blue by default), indicating that
a breakpoint has been set. Clicking on it again clears the breakpoint you have set.
Summary of Contents for S5U1C17001C
Page 6: ......
Page 17: ...1 General S5U1C17001C Manual 1 General ...
Page 18: ......
Page 21: ...1 2 Install S5U1C17001C Manual 2 Installation ...
Page 22: ......
Page 29: ...3 SoftDev S5U1C17001C Manual 3 Software Development Procedures ...
Page 30: ......
Page 103: ...4 SrcFiles S5U1C17001C Manual 4 Source files ...
Page 104: ......
Page 121: ...5 IDE S5U1C17001C Manual 5 gnU17 iDE ...
Page 122: ......
Page 365: ...6 Compiler S5U1C17001C Manual 6 C Compiler ...
Page 366: ......
Page 385: ...7 Library S5U1C17001C Manual 7 library ...
Page 386: ......
Page 405: ...8 Assemblr S5U1C17001C Manual 8 assembler ...
Page 406: ......
Page 439: ...9 Linker S5U1C17001C Manual 9 linker ...
Page 440: ......
Page 449: ...10 Debugger S5U1C17001C Manual 10 Debugger ...
Page 450: ......
Page 626: ...11 Tools S5U1C17001C Manual 11 Other Tools ...
Page 627: ......
Page 696: ...S1C17 Family C Compiler Package Quick Reference Reference ...