Skip Navigation Links | |
Exit Print View | |
Oracle Solaris Modular Debugger Guide Oracle Solaris 11.1 Information Library |
Scoping Within User-Level Applications and Shared Libraries
Using the Scoping Operator With a Kernel Module
Dcmd and Walker Name Resolution
4. Using MDB Commands Interactively
9. Debugging With the Kernel Memory Allocator
The ! character can be used to create a pipeline between an MDB command and the user's shell. Shell escapes are available only when using mdb and not when using kmdb. If the $SHELL environment variable is set, MDB will fork and exec this $SHELL program for shell escapes. If $SHELL is not set, /bin/sh is used. The shell is invoked with the -c option followed by a string formed by concatenating the words after the ! character.
The ! character takes precedence over all other metacharacters, except semicolon (;) and newline. After a shell escape is detected, the remaining characters up to the next semicolon or newline are passed “as is” to the shell. The output of shell commands cannot be piped to MDB dcmds. The output of commands executed by a shell escape is sent directly to the terminal, not to MDB.