1
Solaris kadb cheat sheet
2
=========================
6
See Chapter 18 of Solaris' 9 "Writing Device Drivers"
7
(http://docs.sun.com/db/doc/806-5222)
9
If using a tip connection, boot with 'b kadb -d' and at the break for __start,
10
create a deferred breakpoint with this command: hgfs# HgfsDevAttach:b
14
Deferred: <module># <symbol>:b
17
- Regular will complain if symbol isn't found.
20
hgfs# HgfsDevAttach:b --> deferred breakpoint for HgfsDevAttach
21
takes effect when hgfs module is loaded
22
HgfsGetNewReq:b --> breakpoint for HgfsGetNewReq
24
Commands at breakpoints:
27
:e : single step over function calls
28
:u : stop after return to caller of current function
29
:d : delete breakpoint
30
:z : delete allbreakpoints
36
<symbol>,<count>/<modifier>
38
<symbol> : symbol name, as in HgfsDevAttach, or address
39
<count> : number of items to show
40
<modifier>: see pg. 348 "Writing Device Drivers" for complete list
42
d,D : 2,4-byte decimal
44
K : 4-byte hex for 32 bit progs (use this for pointers)
45
u,U : 2,4-byte unsigned decimal
46
c,C : character, without or with ^escape notation
47
s,S : string, without or with ^escape notation
49
a : prints address in symbolic form
53
HgfsGetNewReq,24/ai --> see first 24 instructions of HgfsGetNewReq
54
0x01234567,24/X --> see 24 4-byte words at that address in hex
55
*0x1234567,24/X --> see the 24 4-byte words at memory address
56
specified in 0x1234567
62
$b : display breakpoints
65
Pager (pause after <lines> lines)
73
Display a single register: <(register)=K
74
Set value of a register : (value)>(register)
77
<eip=K Display the current contents of eip
78
0xdf78b1f8>eip Set the value of eip to 0xdf78b1f8