tb (Trace to Next Branch)
The tb command executes the program until a branch instruction is reached.
tb [r] [= StartAddress] [Count]
Turns on and off the display of registers and flags. By default, the registers and flags are displayed. You can disable register display by using the tbr, pr, tr, or .prompt_allow -reg commands. All of these commands control the same setting and you can use any of them to override any previous use of these commands.
You can also disable register display by using the l-os command. This setting is separate from the other four commands. To control which registers and flags are displayed, use the rm (Register Mask) command.
Specifies the address where the debugger starts execution. If you do not use StartAddress, execution begins at the instruction that the instruction pointer points to. For more information about the syntax, see Address and Address Range Syntax.
Specifies the number of branches to allow. Every time that a branch is encountered, the instruction address and the instruction are displayed. If you omit Count, the default number is 1.
x86-based: Kernel mode only Itanium-based: User mode, kernel mode x64-based: User mode, kernel mode
Live debugging only
x86-based (GenuineIntel processor family 6 and later), Itanium-based, x64-based
For more information about related commands, see Controlling the Target.
The tb command causes the target to begin executing. This execution continues until a branch command is reached.
Execution stops at any branch command that is to be taken. This stopping of execution is always based on the disassembly code, even when the debugger is in source mode.
Branch instructions include calls, returns, jumps, counted loops, and while loops. If the debugger encounters an unconditional branch, or a conditional branch for which the condition is true, execution stops. If the debugger encounters a conditional branch whose condition is false, execution continues.
When execution stops, the address of the branch instruction and any associated symbols are displayed. This information is followed by an arrow and then the address and instructions of the new program counter location.
The tb command works only on the current processor. If you use tb on a multiprocessor system, execution stops when a branch command is reached or when another processor's event occurs, whichever comes first.
Usually, branch tracing is enabled after the processor control block (PRCB) has been initialized. (The PRCB is initialized early in the boot process.) However, if you have to use the tb command before this point, you can use .force_tb (Forcibly Allow Branch Tracing) to enable branch tracing earlier. Use the .force_tb command cautiously, because it can corrupt your processor state.