JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Modular Debugger Guide     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

1.  Modular Debugger Overview

2.  Debugger Concepts

3.  MDB Language Syntax

Syntax

Commands

Comments

Arithmetic Expansion

Unary Operators

Binary Operators

Quoting

Shell Escapes

Variables

Symbol Name Resolution

Symbol Tables

Symbol Name Scoping

Scoping Within User-Level Applications and Shared Libraries

Object Identifier

Link Map Identifier

Scoping Within the Kernel

Kernel Debug Information

Using the Scoping Operator With a Kernel Module

Dcmd and Walker Name Resolution

Dcmd Pipelines

Formatting Dcmds

4.  Using MDB Commands Interactively

5.  Built-In Commands

6.  Execution Control

7.  Kernel Execution Control

8.  Kernel Debugging Modules

9.  Debugging With the Kernel Memory Allocator

10.  Module Programming API

A.  MDB Options

B.  Notes

C.  Transition From adb and kadb

D.  Transition From crash

Index

Syntax

MDB processes commands from standard input. If standard input is a terminal, MDB provides terminal editing capabilities. MDB can also process commands from macro files and from dcmd pipelines.

The MDB language syntax defines the following behavior:

  1. Compute the value of an expression. This value typically is a memory address in the target. The current address location is referred to as dot. Use the dot or period character (.) to reference the value of the current address.

  2. Apply a dcmd to the computed address.

A metacharacter is a newline, space, or tab character, or one of the following characters:

[   ]   |   !   /   \   ?   =   >   $   :   ;

A blank is a space or tab character.

A word is a sequence of characters separated by one or more non-quoted metacharacters.

An expression is a sequence of words that is evaluated to compute a 64-bit unsigned integer value. The words are evaluated using the rules described in Arithmetic Expansion.

An identifier is a sequence of letters, digits, underscores, periods, or back quotation marks. An identifier begins with a letter, underscore, or period. Identifiers are used as the names of symbols, variables, dcmds, and walkers. Commands are delimited by a newline or semicolon (;).

A dcmd is denoted by one of the following words or metacharacters:

/   \   ?   =   >   $character   :character   ::identifier

Dcmds named by metacharacters or prefixed by a single dollar sign ($) or colon character (:) are provided as built-in operators. These dcmds implement complete compatibility with the command set of the legacy adb(1) utility. After a dcmd has been parsed, the /, \, ?, =, >, $, and : characters are no longer recognized as metacharacters until the termination of the argument list.

A simple-command is a dcmd followed by a sequence of zero or more blank-separated words. The words are passed as arguments to the invoked dcmd, except as specified under Arithmetic Expansion and Quoting.

Each dcmd returns an exit status value that indicates one of the following occurred:

A pipeline is a sequence of one or more simple-commands, each separated by the vertical bar or pipe character (|). After the pipeline has been parsed, each dcmd is invoked in order from left to right. The output of each dcmd is processed and stored as described in Dcmd Pipelines. After the first dcmd in the pipeline is complete, its processed output is used as input for the second dcmd in the pipeline. When the second dcmd is complete, its output is used as input for the third dcmd in the pipeline, and so on. If any dcmd does not return a successful exit status, the pipeline is aborted.