13 Specifying a Debugging Target..............................................................................................

133

13.1 Active targets.............................................................................................................

133

13.2 Commands for managing targets..............................................................................

133

13.3 Choosing target byte order........................................................................................

135

14 HP-UXConfiguration-Specific Information.................................................................................

137

14.1 Summary of HP Enhancements to GDB....................................................................

137

14.2 HP-UX dependencies................................................................................................

140

14.2.1 Linker Dependencies.........................................................................................

140

14.2.2 Dependent Standard Library Routines for Run Time Checking......................

140

14.3 Supported Platforms and Modes..............................................................................

142

14.4 HP-UX targets............................................................................................................

143

14.5 Support for Alternate root.........................................................................................

143

14.6 Specifying object file directories................................................................................

144

14.7 Fix and continue debugging......................................................................................

145

14.7.1 Fix and Continue compiler dependencies.........................................................

146

14.7.2 Fix and Continue restrictions............................................................................

146

14.7.3 Using Fix and Continue.....................................................................................

147

14.7.4 Example Fix and Continue session...................................................................

148

14.8 Inline Support............................................................................................................

150

14.8.1 Inline Debugging in HP 9000 Systems..............................................................

150

14.8.2 Inline Debugging in Integrity Systems.............................................................

151

14.8.2.1 Debugging Inline Functions in Integrity Systems.....................................

152

14.9 Debugging Macros....................................................................................................

153

14.9.1 Viewing and Evaluating Macro Definitions......................................................

153

14.9.1.1 Compiler Options to Enable Macro Debugging.......................................

154

14.9.2 Examples for Macro Debugging........................................................................

155

14.10 Debugging Memory Problems................................................................................

157

14.10.1 When to suspect a memory leak......................................................................

158

14.10.2 Memory debugging restrictions......................................................................

158

14.10.3 Memory Debugging Methodologies...............................................................

158

14.10.4 Debugging Memory in Interactive Mode........................................................

159

14.10.4.1 Commands for interactive memory debugging......................................

159

14.10.4.2 Example for interactive debugging session.............................................

163

14.10.5 Debugging Memory in Batch Mode................................................................

164

14.10.5.1 Setting Configuration Options for Batch Mode......................................

164

14.10.5.2 Environment variable setting for Batch mode debugging......................

167

14.10.5.3 Example for Batch Mode RTC.................................................................

169

14.10.6 Debugging Memory Interactively After Attaching to a Running Process......

171

14.10.7 Configuring memory debugging settings.......................................................

173

14.10.7.1 Specifying the stack depth.......................................................................

173

14.10.7.2 Specifying minimum leak size................................................................

173

14.10.7.3 Specifying minimum block size..............................................................

174

6Table of Contents