breakpoint
Action
void breakpoint(void)
The breakpoint
action induces a kernel breakpoint, causing the system to stop and transfer control to the kernel debugger. The kernel debugger emits a string denoting the DTrace probe that triggered the action. For example, type the following command:
# dtrace -w -n clock:entry'{breakpoint()}'
dtrace: allowing destructive actions
dtrace: description 'clock:entry' matched 1 probe
On Oracle Solaris running on SPARC, the following message might appear on the console:
dtrace: breakpoint action at probe fbt:genunix:clock:entry (ecb 30002765700) Type 'go' to resume ok
On Oracle Solaris running on x86, the following message might appear on the console:
dtrace: breakpoint action at probe fbt:genunix:clock:entry (ecb d2b97060) stopped at int20+0xb: ret kmdb[0]:
The address following the probe description is the address of the enabling control block (ECB) within DTrace. You can use this address to determine more details about the probe enabling that induced the breakpoint action.
A mistake with the breakpoint
action may cause it to be called far more often than intended. This behavior might in turn prevent you from even terminating the DTrace consumer that is triggering the breakpoint actions. In this situation, set the kernel tunable dtrace_destructive_disallow
to 1
. This setting will disable all destructive actions on the system.
The method for setting dtrace_destructive_disallow
, depends on the kernel debugger that you are using. If you are using the OpenBoot PROM on a SPARC system, use the w!
option.
ok 1 dtrace_destructive_disallow w!
ok
Use the w?
option to confirm that the dtrace_destructive_disallow
variable is set.
ok dtrace_destructive_disallow w?
1
ok
Type go
to continue.
ok go
If you are using kmdb
on x86 or SPARC systems, use the 4-byte write modifier (W
) with the /
formatting dcmd
to set dtrace_destructive_disallow
.
kmdb[0]: dtrace_destructive_disallow/W 1 dtrace_destructive_disallow: 0x0 = 0x1 kmdb[0]:
Use :c
to continue.
kadb[0]: :c
To re-enable destructive actions after continuing, explicitly reset dtrace_destructive_disallow
back to 0 by using mdb
. For more information, see the mdb
(1) man page.
# echo "dtrace_destructive_disallow/W 0" | mdb -kw
dtrace_destructive_disallow: 0x1 = 0x0
#