thbreak

This command sets a hardware execution breakpoint at a specific location and subsequently deletes it when the breakpoint is hit. You can also specify a conditional breakpoint by using an if statement that stops only when the conditional expression evaluates to true.

Note

The number of hardware breakpoints are usually limited. If you run out of hardware breakpoints then delete or disable one that you are no longer using.

Breakpoints that are set within a shared object are deleted when the shared object is unloaded.

Show/hideSyntax

thbreak [-d] [-p] [ [filename:]location | *address] [thread thread_num...] [if expression]

Where:

d

Disables the breakpoint immediately after creation.

p

Specifies whether or not the resolution of an unrecognized breakpoint location results in a pending breakpoint being created.

filename

Specifies the file.

location

Specifies the location:

line_num

is a line number.

function

is a function name.

label

is a label name.

+offset | -offset

Specifies the line offset from the current location.

address

Specifies the address. This can be either an address or an expression that evaluates to an address.

expression

Specifies an expression that is evaluated when the breakpoint is hit.

If no arguments are specified then a hardware breakpoint is set at the next instruction.

Show/hideExample

Example 135. thbreak

thbreak *0x8000                # Set breakpoint at address 0x8000
thbreak *0x8000 thread $thread # Set breakpoint at address 0x8000 on
                               # current thread
thbreak *0x8000 thread 1 3     # Set breakpoint at address 0x8000 on 
                               # threads 1 and 3
thbreak main                   # Set breakpoint at address of main()
thbreak SVC_Handler            # Set breakpoint at address of label SVC_Handler
thbreak +1                     # Set breakpoint at address of next source line
thbreak my_File.c:main         # Set breakpoint at address of main(), my_File.c
thbreak my_File.c:8            # Set breakpoint at address of line 8, my_File.c
thbreak function1 if x>0       # Set conditional breakpoint that stops when x>0

Show/hideSee also

Copyright © 2010 ARM. All rights reserved.ARM DUI 0452B
Non-ConfidentialID100410