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