Manufacturing Part Number B6454-97413 June
C++ SoftBench Users Guide
Legal Notices
Page
Printing History
Boldface font
Convention Description
Page
Contents
Using SoftBench Configuration Manager
Using SoftBench Editors
Using SoftBench Class Graph/Editor
Using SoftBench Debugger
Contents
Using SoftBench Debugger Data Graph Window
Using Static Graphs
Using SoftBench File Compare
Using SoftBench Graph Windows
Using Regular Expressions
Contents
Maximizing Your Results with
Major Software Development Tasks Supported by SoftBench
SoftBench Task Flow
SoftBench Tools Interacting with Project and Files
Understanding Projects
More sets of build instructions and dependencies
Building Targets
Understanding Build Configurations and Packages
Understanding Projects
Simplified Build Configuration, Package, and Transform Series
Choosing Between Project Build and External Build Models
Understanding Projects
One Project, Many Authors
Sharing Projects with a Team
One Project, One Author
Team Members Cloning the Project Definition
Team Members Sharing the Project Definition
Team Members Using Subprojects
One Project with Subprojects, Many Authors
Sharing Projects with a Team Chapter
Planning Your Project
Editors
Using the SoftBench Integrated Environment
Configuration Management
SoftBench Static Analyzer
SoftBench Debugger
Using SoftBench Tools Throughout Your Development Cycle
SoftBench File Compare
SoftBench Message Monitor
Using SoftBench Tools Together
Tools That Can Directly Invoke Other Tools
Using SoftBench Tools on Multiple Projects
10 Iconize and Normalize Project Buttons
Using SoftBench Tools as Standalone Tools
Copying Data between SoftBench Tools
Reusing Tool Windows
An Example SoftBench Session
An Example SoftBench Session
Learning SoftBench
Using SoftBench
Shell Syntax
Prerequisites to Using SoftBench
Starting SoftBench
Unexpanded SoftBench Window
Understanding SoftBench Window Areas
Window Area Description
Description of SoftBench Window Areas
Static, and Optimized compiler
Expanded SoftBench Window Displaying Builder
Understanding the Builder
CodeAdvisor
Understanding the SoftBench CodeAdvisor
Expanded SoftBench Window Displaying SoftBench
Understanding SoftBench Window Areas
Creating a Project Using Project Build
Setting Up a Project
Create Project Dialog Box
Create Project Dialog Box for External Build
Creating a Project Using External Build
Cloning a Project from an Existing Project
Repartitioning an Existing Project
Creating a Subproject
Modifying a Project Definition
Creating Files within a Project
Add Files to Project Dialog Box
Adding Existing Files to a Project
Adding Existing Files to a Project
Creating a Target
Defining Targets for Project Build
Specifying Dependency Relationships
Manage Build Configuration Dialog Box
Customizing Build Configurations
Using Build Packages
Defining Targets for External Build
External Build Command Dialog Box
Defining Targets for External Build
Build Model Operations in the Target Graph
Using the Target Graph
Operation Project Build External Build
Understanding the Graph
Color Meaning
Displaying Dependencies
Graph Node States
Starting Your Configured Editor
Controlling Graph Complexity
Building a Selected Target
Building Projects and Targets
Setting the Compile Mode
Compile Mode Settings Default Compiler Flag
Previewing the Build
Using the External Build Command Dialog Box
Building Subprojects
Handling Errors
Compiling Instead of Building
Browsing and Correcting Build Errors
Interpreting Error Messages
Running the Build on a Remote System
Checking Your Code Using SoftBench CodeAdvisor
Running Other SoftBench Tools
Managing Your SoftBench Environment
Adding and Removing Tool Icons
Registering New Tools with SoftBench
Choosing Tool Preferences
Accessing Distributed Data and Tools
Customizing SoftBench by Setting Resources
Stopping SoftBench
Running SoftBench on a Remote System
Integrating with CDE
Restoring Your Previous SoftBench Session
11 SoftBench Online Help Window
Getting Help
Accessing On Item Help
Using the Help Menu
Condition or Explanation Message
If Something Goes Wrong
For More Information
For More Information Chapter
Using SoftBench Configuration
Integration of SoftBench CM with SoftBench
Understanding SoftBench CM
Understanding SoftBench CM
Getting Started a Brief Overview
Choose Directory Create…
Choose Actions Check Out to Local Directory
Browsing Local Network Servers and Archives
Managing the Archive System
Viewing Local Servers and SoftBench CM Archives
SoftBench CM Main Window
Creating an Archive Directory
File or directory name
SoftBench CM File Mapping
Creating a Mapping between an Archive Directory
Local Directory
Modifying Mappings between Local and Archive Directories
100
Show / Modify Mappings Dialog Box
Chapter 101
Creating Initial Archive Files
Managing Archive Files and Directories
Checking Out Archive Files
102
Updating a Local Directory
Cancelling Archive File Check Out
Viewing Contents of Archive Files
Viewing an Archive File
106
Deleting Archive Files and Directories
Locking an Archive File
Break File Lock Dialog Box
Breaking a Lock on an Archive File
Viewing the Revision History of Archive Files
108
Show Revision History Dialog Box for an Archive File
Setting Archive Display Filters
Modifying Local Source Files
Managing Local Files
Checking In Modified Files
110
Chapter 111
112
Creating a Default Symbolic Name for Archive Files
Understanding Symbolic Names
Symbolic Name Example
Defining Symbolic Names
Actions and Results After Setting Symbolic Name List
Symbolic Names and Revision Numbers File File Y
Action Result
114
Man Task Description
Using the SoftBench CM Command Line Interface
SoftBench CM Command Line Man Pages
116
Using SoftBench Editors
118
Using Editors with Projects
Configuring SoftBench Program Editor
Configuring an Editor
Configuring SoftBench vi Editor
120
Starting the Configured SoftBench Editor
122
Editing with SoftBench XEmacs Editor
Using SoftBench XEmacs
Editing Multiple Files
Accessing Help
SoftBench XEmacs Main Window
124
Chapter 125
126
Editing with SoftBench vi Editor
SoftBench vi Editor Window
Using the Mouse Pointer Versus the Text Cursor
128
Reusing the Edit Window
If the vi autowrite SoftBench vi Editors behavior Option
Selecting, Copying, and Pasting Text
Calling Other SoftBench Tools from the Editors
Accessing SoftBench Static Analyzer from the Editor
Compiling a Program File
Building a Project
Using Configuration Management
Setting Breakpoints in a Program File
132
Using SoftBench Class
134
Editing C++ Structures with SoftBench Class Graph/Editor
Understanding the SoftBench Class Graph/Editor Use Model
SoftBench Class Graph/Editor Use Model
136
Synchronizing Editor Views and the Static Database
Chapter 137
138
Using SoftBench Class Graph/Editor in Your Work
Viewing the Existing Class Hierarchy
Modifying Existing Components
Creating New Components
140
Deleting Existing Components
Creating a New Program
Sample Use Models
Modifying an Existing Program
Working with Class Templates
142
Condition Explanation
144
Using SoftBench CodeAdvisor
146
Using SoftBench CodeAdvisor
Chapter 147
148
Preparing Your Program with External Build
Performing the Check Code Operation
Preparing Your Program with Project Build
Selecting Rule Groups
Accessing SoftBench CodeAdvisor
Checking Your Program
150
Violations Display
Viewing Violations
152
Terminating SoftBench CodeAdvisor
Filtering Rule Violations
Chapter 153
154
Using SoftBench Debugger
156
Understanding SoftBench Debugger
Chapter 157
158
Preparing Your Program for Debugging
160
Using SoftBench Debugger Window Areas
SoftBench Debugger Window
Chapter 161
162
Tear Apart Main Toolface
Tearing Apart the Main Toolface
164
Specifying the Runtime Environment
Loading or Rerunning an Executable Program
166
Load Executable Dialog Box
Specifying Standard I/O
Setting Environment Variables
Specifying the Working Directory and Program Arguments
168
Specifying Source Locations
Adding Source Directories for External Builds
Debugging Executables in a Project
170
Add Source Directories Dialog Box
Stepping through Your Program
172
Interrupting a Running Program
Interrupting in System or Non-debuggable Routines
Chapter 173
174
Interacting with Your Program
Interacting with a Standard I/O Program
Interacting with a Window-Smart Program
Interacting with a Terminal-Smart Program
176
Specifying Program Location
Specifying Identifier Locations
178
Specifying Variables
Chapter 179
180
Examining and Changing Data in Your Program
182
Examining Data in Your Program
Changing Data in Your Program
Using Debugger Variables
Printing Hex or String Values
184
Using Expressions
Using Constants
186
Calling Functions
Viewing the Call Stack
Stack View Window
Viewing Thread Stacks
188
Understanding the Operation of Your Program
Debugging a Program Using Breakpoints
Setting and Using Breakpoints
190
Setting a Breakpoint
Using the Editable Source Area
Break Menu
192
Using the Break Menu
Using the Breakpoint Set/Change Dialog Box
Breakpoint Set/Change Dialog Box
Viewing and Modifying Breakpoints
Changing Active / Suspend Status
Clearing a Breakpoint
Changing Verbose / Silent Status
194
Executing DDE Commands at a Breakpoint
196
Viewing and Modifying Group Breakpoints
Setting C++ Breakpoints
Setting Group Breakpoints
198
Setting and Using Watchpoints
Using the Data Watchpoint Set/Change Dialog Box
Using the Watch Menu
Creating Watchpoints
200
Data Watchpoint Window
Viewing and Modifying Watchpoints
202
Clearing a Watchpoint
Chapter 203
Tracing Program Flow
Using the Trace Menu
Creating Traces
204
Trace Set/Change Dialog Box
Using the Trace Set/Change Dialog Box
Viewing Traces
206
Clearing Traces
Editing Source Code
Correcting Errors in Your Program
208
Synchronizing Files
Debugging Dynamic Libraries
210
10 Dynamic Images/Libraries Dialog Box
Tracing Assembly Language
Viewing Assembly Language and CPU Registers
212
Tracing Registers
Chapter 213
214
Handling Signals and Events
Viewing and Editing Intercepts
Chapter 215
216
Handling Signals
Debugging with a Core File
Signal Error Message Text Name
Debugging After a Program Fails Core Dump
218
Debugging Forked Processes
220
Debugging Threaded Applications
Viewing and Manipulating Threads
Setting Breakpoints on Threads
222
Attaching the Debugger to a Running Program
Debugging C++ Programs
224
Debugging Static Constructors
Using Breakpoints for Exception Handling
Accessing Inherited C++ Values
226
Debugging Optimized Code
Specifying Debugger Options
Customizing SoftBench Debugger
Customizing User Buttons
228
Chapter 229
230
Chapter 231
232
Offset argument.
Chapter 233
234
Using SoftBench Debugger Data
Beginning a Browsing Session
Starting and Stopping the Data Graph Window
Stopping a Browsing Session
236
Data Graph Window Areas
Understanding Data Graph Window Areas
Understanding the Layout Control Area
238
Understanding the Display Control Area
Understanding the Graph Area
Reading Nodes
Data Graph Window Action Menus
Object Selected Actions Allowed
Understanding the Window Control Area
Using Dialog Boxes
Reading Arcs
240
Displaying New Nodes
Using the Graph Area
Using the Node Values Dialog Box
242
Node Values Dialog Box
Node Values Dialog Box Action Menu
Setting Data Member Values
Displaying Data Members
Following Selected Pointers
Deactivating the Graph
Suspending Graph Updates
Stopping a Graph Process
244
Viewing btree
Verifying Correct Data Structures
Continuing Program Execution
Binary Tree Node
Binary Tree Node with Children
246
Dereferencing Particular Data Members
Viewing Values of Data Members
Showing Nodes
Viewing Embedded Arrays
Viewing Values from Multiple Nodes
Viewing Values from Embedded Arrays
Showing Values On the Graph
Viewing Data Members on The Graph Nodes
250
Using SoftBench Static
252
Starting SoftBench Static Analyzer
Chapter 253
254
Preparing to Make Queries
Generating Static Data
Updating Static Data without Building
Using the Default Analysis File Set
Specifying Static Data to Analyze
Including Subprojects and Parent Projects
256
Customizing the File Set in Non-Project Mode
Keeping Analysis Files Current
Determining the File Set Status
Filtering Queries by File Set
258
Using SoftBench Static Analyzer Window Areas
SoftBench Static Analyzer Window and Areas
Making General Queries
Making Textual Static Queries
Making Queries Based on a Program Identifier
260
Understanding the Types of References
Selecting Text
262
Relationships among Reference Queries
Determining Identifier Classification
Using Pattern Matching
Troubleshooting Invalid Identifiers for Queries
Browsing the Query Result
Using Query Results
Editing the Source File
Updating the Database
Performing a Query
Command Description
Filtering Results Using the File Set
Simplifying Query Results
SoftBench Static Analyzer Display Options
Filtered Source File List
Unfiltered Source File List
268
Using Scoping
Filtering C++ Query Results
Scoping Example
Troubleshooting Scoping Information
Scoping Prerequisites and Constraints
270
Redisplaying Query Results
Redisplaying Past Queries
Deleting a Query Result
Saving and Printing a Query Result
272
Searching Subdirectories
Using SoftBench Static Analyzer in Standalone Mode
Generating Static Data from the Command Line
274
Using the Staticfileset File
Customizing SoftBench Static Analyzer
276
Condition or Message Explanation
Analysis file set choose F ile
Chapter 277
278
Chapter 279
280
Staticrmfile1
Chapter 281
282
Using Static Graphs
284
Starting SoftBench Static Analyzer Graphs
286
General Static Graph Features
Making Graphical Static Queries
Operating on Static Graph Nodes
Finding Graph Nodes
288
Switching between Static Graphs
Displaying Nodes on Another Graph
Function Description Dialog Box
Using Description Boxes
290
Setting Breakpoints for SoftBench Debugger
Saving Static Graph Images to Files
Chapter 291
292
Simplifying Graph Displays
Reducing Graph Complexity
Filtering Sourceless Nodes
294
Customizing Static Graphs
Removing the Graph Legend Viewing Multiple Graphs
Using SoftBench File Compare
Understanding the Menu Bar
Understanding the SoftBench File Compare Window
Understanding the Working Directory Input Box
296
Using the Merge File Input Box
Using the Left File and Right File Input Boxes
Understanding the Text Areas
Reading the Gutter Column
298
Selecting Lines for Merging
Left Right Selection Column
Traversing by Single Line
Highlighting Differences
300
Comparing Two Files
Merging Compared Files
302
Chapter 303
304
Using SoftBench Message Monitor
306
Starting SoftBench Message Monitor
Understanding Broadcast Messages
Understanding the SoftBench Message Monitor Window Area
308
Clearing the Broadcast Message Area
Send Message Dialog Box
Composing and Sending a Message
310
For SoftBench XEmacs
Starting and Stopping Message Logging
Logging Messages
Specifying a Log File
312
Using SoftBench with SQL
314
Determining Supported Environments
Using SQL with Project Build
Using Default SQL File Types
Configuring SoftBench with SQL
SQL File Extensions for C Language
316
Updating Rdbms Versions
Using SQL with External Build
318
Debugging with SQL
Using SQL with SoftBench Tools
Using SQL Preprocessor Wrappers
320
Debugging Expanded SQL Statements
Editing and Rebuilding with SQL for SoftBench Debugger
322
Using SoftBench Graph Windows
324
Accessing SoftBench Graph Windows
Appendix a 325
Using Popup Menus
Using Graph Window Areas
Using Save Options for the Graph Image
326
Figure A-1 Save Image Dialog Box
Table A-2 Graph Image File Formats Option Used for
328
Using Graph File Image Save Options
Saving HP-GL and PostScript Images
Saving xwd Images
330
Using Vertical and Horizontal Scrolling
Clearing the Graph Area
Zooming In or Zooming Out
Reading Graph Area Nodes
Understanding Nodes and Arcs
Selecting Nodes and Arcs
332
Appendix a 333
334
Table A-4 Methods for Selecting Multiple Objects Procedure
Moving Nodes
Appendix a 335
Customizing SoftBench Graphs
Menu settings
Controlling Graph Layout
Controlling Graph Display
Understanding Window Status Information
338
Customizing SoftBench CM Configuration
340
Modifying the Configuration Files
Table B-1 Server Configuration Files File Name Description
Figure B-1 File Mapping Between Local and Archive Files
Configuring Where Archive Files are Stored
342
Defining User Access to the Server
Appendix B 343
344
Format 2. Place path field first and permissions field second
Recommended Format for Permissions File
Format 1. Place user field first and permissions field second
346
Setting Logging and Debug Options
Appendix B 347
Migrating Archive Files From RCS
Performing SoftBench CM Administrator Tasks
Migrating Archive Files From Sccs
348
Moving Archive Storage Locations
Creating Archive Backups
Modifying the Lockinfo File
350
Using the Archive Activity Log
Troubleshooting
Using the Archive Status and Error Log
352
Using Regular Expressions
354
Pattern Matching
Appendix C 355
356
Appendix C 357
358
Appendix C 359
360
Customizing SoftBench for Native Language Support NLS
362
Preparing to Use NLS in SoftBench
Appendix D 363
364
Setting the Lang Environment Variable
Table D-1 To have Lang apply to Set Lang
Converting from One Encoding Method to Another
366
Rebinding Alt
Changing or Removing Menu Mnemonics
SoftBench Mnemonics and Non-USASCII Character Inputs
368
Customizing Keyboard Accelerators
370
Starting Your Localized SoftBench
372
Remote Execution Hosts and NLS
Character Input Example
Editing in SoftBench
374
375
Glossary
376
377
378
379
380
381
382
383
384
See also Project Root
385
386
387
388
389
Symbols
Index
390
391
CDE
392
393
394
395
396
397
398
399
400
401
402
403
Graph, 47, 66
404
405