Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Solaris Modular Debugger Guide
Previous Next

Syntax

The MDB language adheres to the same syntax as the adb(1) language, in order to provide compatibility for legacy macros and script files. New MDB dcmds use the extended form ::name, in order to distinguish them from legacy commands that are prefixed with either : or $. Expressions can also be evaluated on the right-hand side of a dcmd name by enclosing them in square brackets preceded by a dollar sign ($[ ]). Similar to adb(1), an input line that begins with an exclamation mark (!) indicates that the command line should be executed by the user's shell. In MDB, a debugger command may also be suffixed with an exclamation mark to indicate that its output should be piped to the shell command following the exclamation mark.

In adb(1), binary operators are left associative and have lower precedence than unary operators. Binary operators are evaluated in strict left-to-right order on the input line. In MDB, binary operators are left associative and have lower precedence than unary operators, but the binary operators operate in order of precedence according to the table in Binary Operators. The operators conform to the order of precedence in ANSI C. Legacy adb(1) macro files that do not explicitly parenthesize ambiguous expressions may need to be updated to work with MDB. For example, in adb the following command evaluates to the integer value nine:

$ echo "4-1*3=X" | adb
        9

In MDB, as in ANSI C, operator * has higher precedence than - and therefore the result is the integer value one:

$ echo "4-1*3=X" | mdb
        1
Previous Next

 
 
  Published under the terms fo the Public Documentation License Version 1.01. Design by Interspire