Using Sun WorkShop introduces you to the basic program development features of Sun(TM) WorkShop(TM). This book describes how to:
Select a default text editor
Run a build job
Debug a program
Browse source code
Analyze performance data
Merge source files
Set some Sun WorkShop resources
This manual is for application developers who want to use the main development features of Sun WorkShop. For a discussion of Sun WorkShop program analysis tools, see Analyzing Program Performance With Sun WorkShop. For a discussion of Sun WorkShop debugging tools, see Debugging a Program With dbx.
Using Sun WorkShop contains the following chapters:
Chapter 1, About Sun WorkShop" is an overview of the Sun WorkShop programming environment. This chapter also highlights the components available in the various Sun WorkShop products.
Chapter 2, Getting Started" explains what you need to do to start developing in Sun WorkShop, including how to start Sun WorkShop, how to select a text editor, and how to use WorkSets.
Chapter 3, Browsing Source Code" shows you how to use the Browsing window, the Call Grapher, the Class Grapher, and the Class Browser to examine source files, function call relationships, and class hierarchies.
Chapter 4, Building Programs in Sun Workshop" shows you how to build an application with Sun WorkShop default settings or your own build settings, and how to fix build errors.
Chapter 5, Debugging a Program" highlights the debugging features offered in Sun WorkShop and describes the basic debugging tasks. It also explains how to debug in Quick Mode, which allows you to run your program normally, but keeps debugging ready in the background to take over the process at any time.
Chapter 6, Analyzing Program Performance" gives an overview of how to gather and examine the various types of data with the Sampling Collector and Sampling Analyzer, and how to use other performance analysis tools to improve the performance of an application.
Chapter 7, Merging Source Files" shows you how to compare different versions of a source file and merge the changes.
Appendix A, Setting Sun WorkShop Resources" shows you how to modify some of the resource settings in Sun WorkShop.
Appendix B, The make Utility and Makefiles" describes the options that you can set for the make utility.
Appendix C, Using the dmake Utility" describes the way DistributedMake (dmake) distributes builds over several hosts to build programs concurrently over a number of workstations or multiple CPUs.
Appendix D, Browsing Source With sbquery, sb_init, and sbtags," describes sbquery, one of the command-line utilities for browsing source code. It also tells you how to work with source files whose database information is stored in multiple directories, and describes the sbtags command, which provides a quick and convenient method for collecting browsing information from source files.
The name of the latest Solaris operating environment release is Solaris 7 but code and path or package path names may use Solaris 2.7 or SunOS 5.7.
The Sun(TM) WorkShop(TM) documentation applies to Solaris 2.5.1, Solaris 2.6, and Solaris 7 operating environments on:
The SPARC(TM) platform
The x86 platform, where x86 refers to the Intel implementation of one of the following: Intel 80386, Intel 80486, Pentium, or the equivalent
The term "x86" refers to the Intel 8086 family of microprocessor chips, including the Pentium, Pentium Pro, and Pentium II processors and compatible microprocessor chips made by AMD and Cyrix. In this document, the term "x86" refers to the overall platform architecture. Features described in this book that are particular to a specific platform are differentiated by the terms "SPARC" and "x86" in the text.
The following Sun manuals and guides provide additional useful information:
Sun WorkShop Quick Install provides installation instructions.
Sun WorkShop Installation and Licansing Reference provides supporting installation and licensing information..
Debugging a Program With dbx provides information on using dbx commands to debug a program.
Analyzing Program Performance With Sun WorkShop describes the profiling tools; LoopTool, LoopReport, LockLint utilities; and use of the Sampling Analyzer to enhance program performance.
Sun WorkShop TeamWare User's Guide describes how to use the Sun WorkShop TeamWare code management tools.
Sun WorkShop Visual User's Guide describes how to use Visual to create C++ and Java(TM) graphical user interfaces.
Sun WorkShop Performance Library Reference Manual discusses the library of subroutines and functions to perform useful operations in computational linear algebra and Fourier transforms.
Sun Visual WorkShop C++ Overview gives a high-level outline of the C++ package suite.
Sun Performance WorkShop Fortran Overview gives a high-level outline of the Fortran package suite.
C++ User's Guide provides information on command-line options and how to use the compiler.
C++ Programming Guide discusses issues relating to the use of templates, exception handling, and interfacing with FORTRAN 77.
C++ Migration Guide describes migrations between compiler releases.
C++ Library Reference explains the iostream libraries.
Tools.h++ User's Guide provides details on the Tools.h++ class library.
Tools.h++ Class Library Reference discusses use of the C++ classes for enhancing the efficiency of your programs.
C User's Guide describes compiler options, pragmas, and more.
FORTRAN 77 Language Reference Manual provides a complete language reference.
Fortran User's Guide provides information on command-line options and how to use the compilers.
Fortran Programming Guide discusses issues relating to input/output, libraries, program analysis, debugging, and performance.
Fortran Library Reference gives detail on the language and routines.
Numerical Computation Guide details floating-point computation numerical accuracy issues.
Standard C++ Library User's Guide describes how to use the Standard C++ Library.
Standard C++ Class Library Reference provides detail on the Standard C++ Library.
The Solaris Linker and Libraries Guide gives information on linking and libraries.
The Solaris Programming Utilities Guide provides information for developers about the special built-in programming tools available in the SunOS(TM) system.
The SunDocsSM program provides more than 250 manuals from Sun Microsystems, Inc. If you live in the United States, Canada, Europe, or Japan, you can purchase documentation sets or individual manuals using this program.
For a list of documents and how to order them, see the catalog section of the SunExpress(TM) Internet site at http://www.sun.com/sunexpress.
Sun WorkShop documentation is available online from several sources:
The docs.sun.com Web site
AnswerBook2TM collections
HTML documents
Online help and release notes
The docs.sun.com Web site enables you to access Sun technical documentation online. You can browse the docs.sun.com archive or search for a specific book title or subject. The URL is http://docs.sun.com.
The Sun WorkShop documentation is also available using AnswerBook2 software. To access the AnswerBook2 collections, your system administrator must have installed the AnswerBook2 documents during the installation process (if the documents are not installed, see your system administrator or Chapter 3 of Sun WorkShop Quick Install for installation instructions). For information about accessing AnswerBook2 documents, see Chapter 6 of Sun WorkShop Quick Install, Solaris installation documentation, or your system administrator.
To access AnswerBook2 documents, Solaris 2.5.1 users must first download AnswerBook2 documentation server software from a Sun Web page. For more information, see Chapter 6 of Sun WorkShop Quick Install.
The following Sun Workshop documents are available online only in HTML format:
Tools.h++ Class Library Reference
Tools.h++ User's Guide
Numerical Computation Guide
Standard C++ Library User's Guide
Standard C++ Class Library Reference
Sun WorkShop Performance Library Reference Manual
Sun WorkShop Visual User's Guide
Sun WorkShop Memory Monitor User's Manual
To access these HTML documents:
Open the following file through your HTML browser:
install-directory/SUNWspro/DOC5.0/lib/locale/C/html/index.html
Replace install-directory with the name of the directory where your Sun WorkShop software is installed (the default is /opt).
The browser displays an index of the HTML documents for the Sun WorkShop products that are installed.
Open a document in the index by clicking the document's title.
This release of WorkShop includes an online help system as well as online manuals. To find out more see:
Online Help. A help system containing extensive task-oriented, context-sensitive help. To access the help, choose Help Æ Help Contents. Help menus are available in all Sun WorkShop windows.
Release Notes. The Release Notes contain general information about Sun WorkShop and specific information about software limitations and bugs. To access the Release Notes, choose Help Æ Release Notes.
The following table describes the typographic changes used in this book.
Table P-1 Typographic Conventions
Typeface or Symbol |
Meaning |
Example |
---|---|---|
AaBbCc123 |
The names of commands, files, and directories; on-screen computer output |
Edit your .login file. Use ls -a to list all files. machine_name% You have mail.
|
AaBbCc123 |
What you type, contrasted with on-screen computer output |
machine_name% su Password: |
AaBbCc123 |
Command-line placeholder: replace with a real name or value |
To delete a file, type rm filename. |
AaBbCc123 |
Book titles, new words or terms, or words to be emphasized |
Read Chapter 6 in User's Guide. These are called class options. You must be root to do this. |
The following table shows the default system prompt and superuser prompt for the C shell, Bourne shell, and Korn shell.
Table P-2 System Prompts
Shell |
Prompt |
---|---|
C shell prompt |
machine_name% |
C shell superuser prompt |
machine_name# |
Bourne shell and Korn shell prompt |
$ |
Bourne shell and Korn shell superuser prompt |
# |