IAS:
Breakpoints



Breakpoints in IAS are modeled (somewhat) on breakpoints in gdb. Each breakpoint can be either a code breakpoint or a data read or write breakpoint. A breakpoint can be in either a disabled state or enabled state and has an ignore count. When a match is generated on an enabled breakpoint, IAS triggers a breakpoint is triggered if its ignore count is zero. If the ignore count is non-zero, IAS decrements the count and execution continues.

Once a breakpoint has been set, you can only disable it, but cannot delete it. This is a known and accepted limitation, and will not be fixed. Breakpoints are set on absolute addresses; IAS does not provide symbolic breakpoints.

Currently, the maximum number of breakpoints you can set in a session is 1,000.

Behavior

All breakpoints are set at a byte boundary. Code breakpoints are triggered only if an instruction about to be executed starts at the set address; A code breakpoint that is set in the middle of an instruction causes unexpected behavior. Data breakpoints are triggered by all accesses that "cover" the breakpoint address: for example, a 32-bit write to the address 0x1000 triggers a breakpoint set at address 0x1002.

For code breakpoints, IAS returns control to you just before it executes the instruction that triggers the breakpoint. Data breakpoints are like watchpoints in that control is returned to you at the end of the instruction that touches the breakpoint address.

IAS ignores code breakpoints during execution of the first instruction of a fresh run, steps, or the continue command that you issue. This behavior is to facilitate continuation of program execution after a code breakpoint has been triggered without having to explicitly disable the breakpoint to avoid triggering it immediately.

Commands

Following are the commands for breakpoints using the Tcl interface. When a breakpoint is set, it is enabled by default and has an ignore count of zero.

brk list Lists the breakpoints that are currently set.
brk exec address Sets a code breakpoint.
brk read address Sets a data read breakpoint.
brk write address Sets a data write breakpoint.
brk access addr Sets two separate breakpoints, a read breakpoint and a write breakpoint, at the same address.
brk ignore brkptnumber count Sets the number of times a hit on this breakpoint (when enabled) is ignored before it causes the simulator to stop. The default ignore count is zero. Once the breakpoint is triggered, the ignore count remains at zero and does not reset to the original ignore count.
brk enable brkptnumber Enables a breakpoint.
brk disable brkptnumber Disables a breakpoint.

IAS

Copyright © 1999 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, CA 94303-4900 USA. All rights reserved.

Last modified 24-March-1999