This method using the nm subcommand.
If the kernel extension is not stripped, the KDB kernel debugger can
be used to locate the address of the load point by name.
For example, the nm demokext subcommand returns the address of the demokext routine after it is loaded. This address can then be used to set
a breakpoint.
Note: The default prompt is KDB(0)>.
- To translate a symbol to an effective address, type the
following:
nm demokext
The output
is similar to the following:
Symbol Address : 01304040
TOC Address : 013046D4
The value of the demokext symbol is the address of the first instruction
of the demokext routine. This value can be used
to set a breakpoint.
- Set the break at the desired location by typing the following:
b 01304040+e0
KDB displays the address
at which the breakpoint is set.
- Display the word at the breakpoint by typing the following:
dw 01304040+e0
The results are similar
to the following:
01304120: 80830000 30840001 90830000 809F0030 ....0..........0
This can be checked against the assembly code in the listing to
verify that the break is set to the correct location.
- Clear all breakpoints by typing the following: