1.3.204 thbreak

Sets a hardware 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 true.

This command records the ID of the breakpoint in a new debugger variable, $n, where n is a number. You can use this variable, in a script, to delete or modify the breakpoint behavior. If $n is the last or second-to-last debugger variable, then you can also access the ID using $ or $$, respectively.

Note:

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

Note:

Breakpoints that are set within a shared object or kernel module become pending when the shared object or kernel module is unloaded.

You can use info breakpoints capabilities to display a list of parameters that you can use with breakpoint commands for the current connection.

Syntax

thbreak [-d] [-p] [[filename:]location|*address] [thread|core number...] [vmid vmid] [context contextid] [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.

number

Specifies one or more threads or processors to apply the breakpoint to. You can use $thread to refer to the current thread. If number is not specified then all threads are affected.

address

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

vmid

Specifies the Virtual Machine ID (VMID) to apply the breakpoint to. This can be either an integer or an expression that evaluates to an integer.

contextid

Specifies the context ID to apply the breakpoint to. This can be either an integer or an expression that evaluates to an integer. You can only use the context parameter if your hardware supports it and your application makes use of the CONTEXTIDR register. For more information, see CONTEXTIDR in the ARM Architecture Reference Manual.

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.

Example 1-207 Examples

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
thbreak context 257 0x80000000 # Set conditional breakpoint at address 0x80000000
                               # that stops when CONTEXTIDR=10
Non-ConfidentialPDF file icon PDF versionARM DUI0452Z
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.