Sets an execution breakpoint at a specific location and deletes the breakpoint when it is hit. You can also specify a conditional breakpoint by using an
if statement that stops only when the conditional expression evaluates to
This command records the ID of the breakpoint in a new debugger variable,
number. You can use this variable, in a script, to delete or modify the breakpoint
is the last or second-to-last debugger variable, then you can also access the ID
Use set breakpoint to control the automatic breakpoint behavior when using this command.
tbreak [-d] [-p] [[
disables the breakpoint immediately after creation.
specifies whether or not the resolution of an unrecognized breakpoint location results in a pending breakpoint being created.
specifies the file.
specifies the location:
is a line number.
- is a function name.
is a label name.
specifies the line offset from the current location.
specifies the address. This can be either an address or an expression that evaluates to an address.
specifies one or more threads or processors to apply the breakpoint to. You can use $thread to refer to the current thread. If
numberis not specified then all threads are affected.
specifies an expression that is evaluated when the breakpoint is hit.
If no arguments are specified then a breakpoint is set at the PC.
Example 1-206 Examples
tbreak *0x8000 # Set breakpoint at address 0x8000. tbreak *0x8000 thread $thread # Set breakpoint at address 0x8000 on # current thread. tbreak *0x8000 thread 1 3 # Set breakpoint at address 0x8000 on # threads 1 and 3. tbreak main # Set breakpoint at address of main(). tbreak SVC_Handler # Set breakpoint at address of label SVC_Handler. tbreak +1 # Set breakpoint at address of next source line. tbreak my_File.c:main # Set breakpoint at address of main() in my_File.c. tbreak my_File.c:8 # Set breakpoint at address of line 8 in my_File.c. tbreak function1 if x>0 # Set conditional breakpoint that stops when x>0.