Chapter Contents

Previous

Next
Using the Global Optimizer and the Object Module Disassembler

The Object Module Disassembler

The object module disassembler, omd , is a useful debugging tool that provides a copy of the assembler code generated for a C or C++ program. If the object module is created with a line number-offset table (that is, if the compiler option -l is in effect), then the source code is merged with the assembler instructions.


Using omd

The object module disassembler can be invoked either directly or by the sascc370 or sasCC370 compiler driver.

Invoking omd directly

The following syntax is used to invoke omd directly:

omd [-v] object-filename source-filename

The object-filename argument specifies the name of a compiled object file, and the source-filename argument specifies the name of the source file used to compile the object. The -v option is specified to generate a verbose listing.

The output from the object module disassembler is directed to standard output when omd is invoked directly. A copy of the source code is merged with the disassembler listing to enable you to associate the assembler instructions with the source. If you specify the -v option, the listing will include a relocation dictionary, a line number-offset table, and an extended name mapping table.

Using sascc370 or sasCC370 to invoke omd

The -S option is used to invoke omd from the compiler driver. For example, the following command could be entered to compile the file named myfile.c and generate a .omd listing file:

sascc370 -S myfile.c

or

sasCC370 -S myfile.cxx

In these cases, the object module disassembler listing would be written to myfile.omd .


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.