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
 Understanding Projects
More sets of build instructions and dependencies
SoftBench Tools Interacting with Project and Files
 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
 Sharing Projects with a Team
One Project, One Author
One Project, Many Authors
 Team Members Cloning the Project Definition
 Team Members Using Subprojects
One Project with Subprojects, Many Authors
Team Members Sharing the Project Definition
 Sharing Projects with a Team Chapter
 Planning Your Project
 SoftBench Static Analyzer
Using the SoftBench Integrated Environment
Editors
Configuration Management
 SoftBench Message Monitor
Using SoftBench Tools Throughout Your Development Cycle
SoftBench Debugger
SoftBench File Compare
 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
 Understanding the SoftBench CodeAdvisor
Expanded SoftBench Window Displaying SoftBench
CodeAdvisor
 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
 Displaying Dependencies
Graph Node States
Color Meaning
 Controlling Graph Complexity
Building a Selected Target
Starting Your Configured Editor
 Building Projects and Targets
Setting the Compile Mode
 Compile Mode Settings Default Compiler Flag
 Previewing the Build
Using the External Build Command Dialog Box
 Handling Errors
Compiling Instead of Building
Building Subprojects
 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
 Running SoftBench on a Remote System
Integrating with CDE
Stopping SoftBench
 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
 Creating an Archive Directory
File or directory name
SoftBench CM Main Window
 Creating a Mapping between an Archive Directory
Local Directory
SoftBench CM File Mapping
 Modifying Mappings between Local and Archive Directories
 100
Show / Modify Mappings Dialog Box
 Chapter 101
 102
Managing Archive Files and Directories
Creating Initial Archive Files
Checking Out Archive Files
 Updating a Local Directory
Cancelling Archive File Check Out
 Viewing Contents of Archive Files
 Viewing an Archive File
 Deleting Archive Files and Directories
Locking an Archive File
106
 Breaking a Lock on an Archive File
Viewing the Revision History of Archive Files
Break File Lock Dialog Box
 108
Show Revision History Dialog Box for an Archive File
 Setting Archive Display Filters
 110
Managing Local Files
Modifying Local Source Files
Checking In Modified Files
 Chapter 111
 Creating a Default Symbolic Name for Archive Files
Understanding Symbolic Names
112
 Symbolic Name Example
Defining Symbolic Names
 114
Symbolic Names and Revision Numbers File File Y
Actions and Results After Setting Symbolic Name List
Action Result
 Using the SoftBench CM Command Line Interface
SoftBench CM Command Line Man Pages
Man Task Description
 116
 Using SoftBench Editors
 118
Using Editors with Projects
 Configuring an Editor
Configuring SoftBench vi Editor
Configuring SoftBench Program Editor
 120
 Starting the Configured SoftBench Editor
 122
Editing with SoftBench XEmacs Editor
 Using SoftBench XEmacs
 124
Accessing Help
Editing Multiple Files
SoftBench XEmacs Main Window
 Chapter 125
 Editing with SoftBench vi Editor
SoftBench vi Editor Window
126
 Using the Mouse Pointer Versus the Text Cursor
 Reusing the Edit Window
If the vi autowrite SoftBench vi Editors behavior Option
128
 Selecting, Copying, and Pasting Text
 Building a Project
Accessing SoftBench Static Analyzer from the Editor
Calling Other SoftBench Tools from the Editors
Compiling a Program File
 Using Configuration Management
Setting Breakpoints in a Program File
 132
 Using SoftBench Class
 Editing C++ Structures with SoftBench Class Graph/Editor
Understanding the SoftBench Class Graph/Editor Use Model
134
 SoftBench Class Graph/Editor Use Model
 136
Synchronizing Editor Views and the Static Database
 Chapter 137
 Using SoftBench Class Graph/Editor in Your Work
Viewing the Existing Class Hierarchy
138
 Modifying Existing Components
Creating New Components
 140
Deleting Existing Components
 Working with Class Templates
Sample Use Models
Creating a New Program
Modifying an Existing Program
 142
 Condition Explanation
 144
 Using SoftBench CodeAdvisor
 146
Using SoftBench CodeAdvisor
 Chapter 147
 148
 Performing the Check Code Operation
Preparing Your Program with Project Build
Preparing Your Program with External Build
 150
Accessing SoftBench CodeAdvisor
Selecting Rule Groups
Checking Your Program
 Violations Display
Viewing Violations
 Terminating SoftBench CodeAdvisor
Filtering Rule Violations
152
 Chapter 153
 154
 Using SoftBench Debugger
 156
Understanding SoftBench Debugger
 Chapter 157
 158
 Preparing Your Program for Debugging
 Using SoftBench Debugger Window Areas
SoftBench Debugger Window
160
 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
 Setting Environment Variables
Specifying the Working Directory and Program Arguments
Specifying Standard I/O
 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
 Interrupting a Running Program
Interrupting in System or Non-debuggable Routines
172
 Chapter 173
 Interacting with Your Program
Interacting with a Standard I/O Program
174
 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
 Using Debugger Variables
Printing Hex or String Values
Changing Data in Your Program
 184
Using Expressions
 Using Constants
 Calling Functions
Viewing the Call Stack
186
 Stack View Window
Viewing Thread Stacks
 188
Understanding the Operation of Your Program
 Debugging a Program Using Breakpoints
Setting and Using Breakpoints
 Setting a Breakpoint
Using the Editable Source Area
190
 Break Menu
 Using the Break Menu
Using the Breakpoint Set/Change Dialog Box
192
 Breakpoint Set/Change Dialog Box
Viewing and Modifying Breakpoints
 194
Clearing a Breakpoint
Changing Active / Suspend Status
Changing Verbose / Silent Status
 Executing DDE Commands at a Breakpoint
 196
 Setting C++ Breakpoints
Setting Group Breakpoints
Viewing and Modifying Group Breakpoints
 198
 Setting and Using Watchpoints
 200
Using the Watch Menu
Using the Data Watchpoint Set/Change Dialog Box
Creating Watchpoints
 Data Watchpoint Window
Viewing and Modifying Watchpoints
 202
Clearing a Watchpoint
 Chapter 203
 204
Using the Trace Menu
Tracing Program Flow
Creating Traces
 Using the Trace Set/Change Dialog Box
Viewing Traces
Trace Set/Change Dialog Box
 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
 Handling Signals and Events
Viewing and Editing Intercepts
214
 Chapter 215
 216
Handling Signals
 Signal Error Message Text Name
Debugging After a Program Fails Core Dump
Debugging with a Core File
 218
 Debugging Forked Processes
 Debugging Threaded Applications
Viewing and Manipulating Threads
220
 Setting Breakpoints on Threads
 222
Attaching the Debugger to a Running Program
 Debugging C++ Programs
 224
 Using Breakpoints for Exception Handling
Accessing Inherited C++ Values
Debugging Static Constructors
 226
 Debugging Optimized Code
 228
Customizing SoftBench Debugger
Specifying Debugger Options
Customizing User Buttons
 Chapter 229
 230
 Chapter 231
 232
Offset argument.
 Chapter 233
 234
 Using SoftBench Debugger Data
 236
Starting and Stopping the Data Graph Window
Beginning a Browsing Session
Stopping a Browsing Session
 Understanding Data Graph Window Areas
Understanding the Layout Control Area
Data Graph Window Areas
 Understanding the Display Control Area
Understanding the Graph Area
238
 Data Graph Window Action Menus
Object Selected Actions Allowed
Reading Nodes
 240
Using Dialog Boxes
Understanding the Window Control Area
Reading Arcs
 Using the Graph Area
Using the Node Values Dialog Box
Displaying New Nodes
 242
Node Values Dialog Box
 Following Selected Pointers
Setting Data Member Values
Node Values Dialog Box Action Menu
Displaying Data Members
 244
Suspending Graph Updates
Deactivating the Graph
Stopping a Graph Process
 Viewing btree
Verifying Correct Data Structures
 246
Binary Tree Node
Continuing Program Execution
Binary Tree Node with Children
 Viewing Values of Data Members
Showing Nodes
Dereferencing Particular Data Members
 Showing Values On the Graph
Viewing Values from Multiple Nodes
Viewing Embedded Arrays
Viewing Values from Embedded Arrays
 Viewing Data Members on The Graph Nodes
 250
 Using SoftBench Static
 252
Starting SoftBench Static Analyzer
 Chapter 253
 Preparing to Make Queries
Generating Static Data
254
 Including Subprojects and Parent Projects
Using the Default Analysis File Set
Updating Static Data without Building
Specifying Static Data to Analyze
 Customizing the File Set in Non-Project Mode
Keeping Analysis Files Current
256
 Determining the File Set Status
Filtering Queries by File Set
 258
Using SoftBench Static Analyzer Window Areas
 SoftBench Static Analyzer Window and Areas
 260
Making Textual Static Queries
Making General Queries
Making Queries Based on a Program Identifier
 Understanding the Types of References
Selecting Text
 Relationships among Reference Queries
Determining Identifier Classification
262
 Using Pattern Matching
Troubleshooting Invalid Identifiers for Queries
 Updating the Database
Using Query Results
Browsing the Query Result
Editing the Source File
 Performing a Query
 SoftBench Static Analyzer Display Options
Filtering Results Using the File Set
Command Description
Simplifying Query Results
 Filtered Source File List
Unfiltered Source File List
 Using Scoping
Filtering C++ Query Results
268
 Troubleshooting Scoping Information
Scoping Prerequisites and Constraints
Scoping Example
 270
 Saving and Printing a Query Result
Redisplaying Past Queries
Redisplaying Query Results
Deleting a Query Result
 272
 Using SoftBench Static Analyzer in Standalone Mode
Generating Static Data from the Command Line
Searching Subdirectories
 274
Using the Staticfileset File
 Customizing SoftBench Static Analyzer
 Condition or Message Explanation
Analysis file set choose F ile
276
 Chapter 277
 278
 Chapter 279
 280
Staticrmfile1
 Chapter 281
 282
 Using Static Graphs
 284
 Starting SoftBench Static Analyzer Graphs
 General Static Graph Features
Making Graphical Static Queries
286
 Operating on Static Graph Nodes
Finding Graph Nodes
 Switching between Static Graphs
Displaying Nodes on Another Graph
288
 Function Description Dialog Box
Using Description Boxes
 Setting Breakpoints for SoftBench Debugger
Saving Static Graph Images to Files
290
 Chapter 291
 Simplifying Graph Displays
Reducing Graph Complexity
292
 Filtering Sourceless Nodes
 Customizing Static Graphs
Removing the Graph Legend Viewing Multiple Graphs
294
 Using SoftBench File Compare
 296
Understanding the SoftBench File Compare Window
Understanding the Menu Bar
Understanding the Working Directory Input Box
 Reading the Gutter Column
Using the Left File and Right File Input Boxes
Using the Merge File Input Box
Understanding the Text Areas
 Selecting Lines for Merging
Left Right Selection Column
298
 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
 Logging Messages
Specifying a Log File
Starting and Stopping Message Logging
 312
 Using SoftBench with SQL
 314
Determining Supported Environments
 SQL File Extensions for C Language
Using Default SQL File Types
Using SQL with Project Build
Configuring SoftBench with SQL
 316
 Updating Rdbms Versions
Using SQL with External Build
 318
 Using SQL with SoftBench Tools
Using SQL Preprocessor Wrappers
Debugging with SQL
 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
 326
Using Graph Window Areas
Using Popup Menus
Using Save Options for the Graph Image
 Figure A-1 Save Image Dialog Box
Table A-2 Graph Image File Formats Option Used for
 Using Graph File Image Save Options
Saving HP-GL and PostScript Images
328
 Saving xwd Images
 330
Using Vertical and Horizontal Scrolling
 Clearing the Graph Area
Zooming In or Zooming Out
 332
Understanding Nodes and Arcs
Reading Graph Area Nodes
Selecting Nodes and Arcs
 Appendix a 333
 Table A-4 Methods for Selecting Multiple Objects Procedure
Moving Nodes
334
 Appendix a 335
 Controlling Graph Display
Menu settings
Customizing SoftBench Graphs
Controlling Graph Layout
 Understanding Window Status Information
 338
 Customizing SoftBench CM Configuration
 Modifying the Configuration Files
Table B-1 Server Configuration Files File Name Description
340
 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
 Recommended Format for Permissions File
Format 1. Place user field first and permissions field second
Format 2. Place path field first and permissions field second
 346
Setting Logging and Debug Options
 Appendix B 347
 348
Performing SoftBench CM Administrator Tasks
Migrating Archive Files From RCS
Migrating Archive Files From Sccs
 Creating Archive Backups
Modifying the Lockinfo File
Moving Archive Storage Locations
 350
 Troubleshooting
Using the Archive Status and Error Log
Using the Archive Activity 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
 Setting the Lang Environment Variable
Table D-1 To have Lang apply to Set Lang
364
 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
 Symbols
Index
389
 390
 391
CDE
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
Graph, 47, 66
 404
 405