Solaris Tunable Parameters Reference Manual

mdb

Starting with the Solaris 8 release is the modular debugger, mdb(1), which is unique among available Solaris debuggers because it is easily extensible. A programming API is available that allows compilation of modules to perform desired tasks within the context of the debugger.

mdb also includes a number of desirable usability features including command-line editing, command history, built-in output pager, syntax checking, and command pipelining. This is the recommended post-mortem debugger for the kernel.

Example—Using mdb to Change a Value

To change the value of the integer variable maxusers from 5 to 6, do the following:


# mdb -kw
Loading modules: [ unix krtld genunix ip logindmux ptm nfs ipc lofs ]
> maxusers/D
maxusers:
maxusers:       495
> maxusers/W 200
maxusers:       0x1ef           =       0x200
> $q

Replace maxusers with the actual address of the item to be changed as well as the value the variable is to be set to.

For more information on using the modular debugger, see the Solaris Modular Debugger Guide.

When using kadb or mdb, the module name prefix is not required because after a module is loaded, its symbols form a common name space with the core kernel symbols and any other previously loaded module symbols.

For example, ufs:ufs_WRITES would be accessed as ufs_WRITES in each of the debuggers (assuming the UFS module is loaded), but would require the ufs: prefix when set in the /etc/system file. Including the module name prefix kadb results in an undefined symbol message.