1 2 3 4XXGDB(1.08) MISC. REFERENCE MANUAL PAGES XXGDB(1.08) 5 6 7 8NAME 9 xxgdb - X window system interface to the gdb debugger. 10 11SYNOPSIS 12 xxgdb [ -_t_o_o_l_k_i_t_o_p_t_i_o_n ... ] [-_x_x_g_d_b_o_p_t_i_o_n ... ] [-_g_d_b_o_p_t_i_o_n 13 ... ] [_o_b_j_f_i_l_e [ _c_o_r_e_f_i_l_e ]] 14 15DESCRIPTION 16 _X_x_g_d_b is a graphical user interface to the _g_d_b debugger 17 under the X Window System. It provides visual feedback and 18 mouse input for the user to control program execution 19 through breakpoints, to examine and traverse the function 20 call stack, to display values of variables and data struc- 21 tures, and to browse source files and functions. 22 23 _X_x_g_d_b allows initial gdb commands stored in the file 24 ._g_d_b_i_n_i_t to be executed immediately after the symbolic 25 information is read. If ._g_d_b_i_n_i_t does not exist in the 26 current directory, the user's home directory is searched 27 (~/._g_d_b_i_n_i_t). Option -nx can be used to prevent xxgdb from 28 executing this file. 29 30 _O_b_j_f_i_l_e is an object file produced by a compiler with the 31 appropriate option (-g) specified to produce symbol table 32 information for gdb. 33 34 If a file named _c_o_r_e exists in the current directory or a 35 _c_o_r_e_f_i_l_e is specified, _x_x_g_d_b can be used to examine the 36 state of the program when the core dump occurred. 37 38 The name of the debugger invoked by _x_x_g_d_b is, by default, 39 gdb, but it can be overridden with the environment variable 40 XXGDB_DEBUGGER or with the db_name option. 41 42OPTIONS 43 _X_x_g_d_b accepts all of the standard X Toolkit command line 44 options (see _X(1)), and all the gdb options (see _g_d_b(1)), 45 plus the following xxgdb specific options: 46 47 -db_name 48 Specify the name of the debugger to override the 49 default "gdb" 50 51 -db_prompt 52 Specify to xxgdb what is the debugger prompt. The 53 default is to expect the prompt to be the name of the 54 debugger enclosed in parenthesis followed by a space 55 (eg, "(gdb) "). 56 57 -nx Do not execute .gdbinit file. 58 59 -bigicon 60 61 62 63X Version 11 Last change: November 1993 1 64 65 66 67 68 69 70XXGDB(1.08) MISC. REFERENCE MANUAL PAGES XXGDB(1.08) 71 72 73 74 Uses a 64x64 icon instead of the default 48x48 icon. 75 76SUBWINDOWS 77 _X_x_g_d_b consists of the following subwindows: 78 79 File Window Display the full pathname of the file 80 displayed in the source window, and the 81 line number of the caret. 82 83 Source Window Display the contents of a source file. 84 85 Message Window Display the execution status and error 86 messages of _x_x_g_d_b . 87 88 Command Window Provide a list of the common gdb com- 89 mands which are invoked by simply click- 90 ing the LEFT mouse button. 91 92 Dialogue Window Provide a typing interface to gdb. 93 94 Display Window Provide a window for displaying vari- 95 ables each time execution stops. 96 97 Popup Windows Provide windows for displaying variables 98 (see "Displaying C Data Structures" 99 below). 100 101 The relative sizes of the source window, command window, and 102 the dialogue window can be adjusted by dragging the grip (a 103 small square near the right edge of a horizontal border) 104 with the LEFT mouse button down. 105 106SELECTION 107 Text selection in the source window is modified to make it 108 easier to select C expressions. LEFT mouse button down 109 selects a C expression by highlighting it in reverse-video. 110 LEFT mouse button down also positions the caret and updates 111 the line label accordingly. 112 113 C expression selection is based on the resource _d_e_l_i_m_i_t_e_r_s 114 which determines the set of characters that delimits a C 115 expression. (The default word selection behavior in the 116 Athena text widget selects a word delimited by white 117 spaces.) Text selection adjustment is possible by holding 118 the LEFT mouse button down and dragging. 119 120 A LEFT mouse button click with the SHIFT button down prints 121 the value of the expression selected. 122 123SCROLLBAR 124 Pressing the LEFT mouse button scrolls the text forward, 125 whereas pressing the RIGHT mouse button scrolls the text 126 127 128 129X Version 11 Last change: November 1993 2 130 131 132 133 134 135 136XXGDB(1.08) MISC. REFERENCE MANUAL PAGES XXGDB(1.08) 137 138 139 140 backward. The amount of scrolling depends on the distance 141 of the pointer button away from the top of the scrollbar. 142 If the button is pressed at the top of the scrollbar, only 143 one line of text is scrolled. If the button is pressed at 144 the bottom of the scrollbar, one screenful of text is 145 scrolled. 146 147 Pressing the MIDDLE mouse button changes the thumb position 148 of the scrollbar. Dragging the MIDDLE mouse button down 149 moves the thumb along and changes the text displayed. 150 151COMMAND BUTTONS 152 Execution Commands 153 run Begin program execution. 154 155 cont Continue execution from where it stopped. 156 157 next Execute one source line, without stepping into 158 any function call. 159 160 step Execute one source line, stepping into a func- 161 tion if the source line contains a function 162 call. 163 164 finish Continue execution until the selected procedure 165 returns; the current procedure is used if none 166 is selected. 167 168 169 Breakpoint Commands 170 break Stop program execution at the line or in the func- 171 tion selected. To set a breakpoint in the pro- 172 gram, place the caret at the start of the source 173 line or on the function name and click the break 174 button. A stop sign will appear next to the 175 source line. 176 177 tbreak Set a breakpoint enabled only for one stop. This 178 is the same as the break button except the break- 179 point is automatically disabled the first time it 180 hit. 181 182 delete Remove the breakpoint on the source line selected 183 or the breakpoint number selected. 184 185 show brkpts 186 Show the current breakpoints (both active and 187 inactive). 188 189 190 Stack Commands 191 stack Show a stack trace of the functions called. 192 193 194 195X Version 11 Last change: November 1993 3 196 197 198 199 200 201 202XXGDB(1.08) MISC. REFERENCE MANUAL PAGES XXGDB(1.08) 203 204 205 206 up Move up one level on the call stack. 207 208 down Move down one level on the call stack. 209 210 211 Data Display Commands 212 print Print the value of a selected expression. (also 213 see "Displaying C Data Structures" below) 214 215 print * Print the value of the object the selected expres- 216 sion is pointing to. (also see "Displaying C Data 217 Structures" below) 218 219 display Display the value of a selected expression in the 220 display window, updating its value every time exe- 221 cution stops. 222 223 undisplay Stop displaying the value of the selected expres- 224 sion in the display window. If the selected 225 expression is a constant, it refers to the display 226 number associated with an expression in the 227 display window. 228 229 args Print the arguments of the selected frame. 230 231 show display 232 Show the names of currently displayed expressions. 233 .IP "locals" Print the local variables of the 234 selected frame. 235 236 stack Print a backtrace of the entire stack. 237 238 239 Miscellaneous Commands 240 search 241 Pop up a search panel which allows both forward (>>) 242 and reverse (<<) search of text strings in the source 243 file. Hitting carriage return after entering the 244 search string will begin a forward search and pop down 245 the search panel. 246 247 file Pop up a directory browser that allows the user to move 248 up and down in the directory tree, to select a text 249 file to be displayed, to select an executable file to 250 debug, or to select a core file to debug. Directory 251 entries are marked with a trailing slash (`/') and exe- 252 cutables with a trailing asterisk (`*'). Filenames 253 beginning with a dot (`.') or ending with a tilde (`~') 254 are not listed in the menu. 255 256 search 257 Pop up a search panel which allows both forward (>>) 258 259 260 261X Version 11 Last change: November 1993 4 262 263 264 265 266 267 268XXGDB(1.08) MISC. REFERENCE MANUAL PAGES XXGDB(1.08) 269 270 271 272 and reverse (<<) search of text strings in the source 273 file. Hitting carriage return after entering the 274 search string will begin a forward search and pop down 275 the search panel. 276 277 yes Send 'y' (yes) to gdb. To be used when gdb requires a 278 yes/no response. 279 280 no Send 'n' (no) to gdb. To be used when gdb requires a 281 yes/no response. 282 283 quit Exit _x_x_g_d_b. 284 285 286 Displaying C Data Structures 287 _X_x_g_d_b provides some primitive support for graphically 288 displaying C structures and the ability of following 289 pointers. Pressing the RIGHT mouse button on the print (or 290 print *) command button displays the value of the selected 291 expression (or the value the selected expression is pointing 292 to) in a popup. If the value is a pointer or a structure 293 containing pointers, the user can examine the value of the 294 object that pointer is pointing to by clicking the pointer 295 value. This will create another popup that displays the 296 object the pointer points to. Clicking the label of the 297 popup pops down itself and all of its descendants. 298 299X DEFAULTS 300 To change the default values of widget resources used in 301 _x_x_g_d_b, you need to reference the widgets by name or by 302 class. The widget hierarchies for the main window, the file 303 menu, the search dialog box, and the popup data display used 304 in xxgdb are shown as follows, with the name of the widget 305 followed by the name of its class in parentheses: 306 307 Main window: 308 toplevel (ToplevelShell) 309 vpane (Paned) 310 fileWindow (Form) 311 fileLabel (Label) 312 lineLabel (Label) 313 sourceForm (Form) 314 sourceWindow (AsciiText) 315 messageWindow (Label) 316 commandWindow (Box) 317 run (Command) 318 cont (Command) 319 next (Command) 320 step (Command) 321 finish (Command) 322 break (Command) 323 tbreak (Command) 324 325 326 327X Version 11 Last change: November 1993 5 328 329 330 331 332 333 334XXGDB(1.08) MISC. REFERENCE MANUAL PAGES XXGDB(1.08) 335 336 337 338 delete (Command) 339 up (Command) 340 down (Command) 341 print (Command) 342 print * (Command) 343 display (Command) 344 undisplay (Command) 345 args (Command) 346 locals (Command) 347 stack (Command) 348 search (Command) 349 file (Command) 350 show display (Command) 351 show brkpts (Command) 352 yes (Command) 353 no (Command) 354 quit (Command) 355 dialogWindow (AsciiText) 356 displayWindow (AsciiText) 357 358 File menu: 359 File Directory (TransientShell) 360 popup (Paned) 361 fileMenuLabel (Label) 362 fileMenu (List) 363 cancelButton (Command) 364 365 Search dialog box: 366 Search (TransientShell) 367 searchPopup (Dialog) 368 << (Command) 369 >> (Command) 370 DONE (Command) 371 372 Data display popup: 373 Data Popup (TransientShell) 374 popup (Form) 375 label (Label) 376 dataDpyWindow (AsciiText) 377 378 In addition to the standard X resources, _x_x_g_d_b uses the fol- 379 lowing application-specific resources for user customiza- 380 tion. The value in parentheses is the default value. 381 382 bell If True, the bell is on. (True) 383 384 displayWindow 385 If True, the display window appears on start up. 386 (False) 387 388 delimiters 389 The set of delimiters for word selection. (" 390 391 392 393X Version 11 Last change: November 1993 6 394 395 396 397 398 399 400XXGDB(1.08) MISC. REFERENCE MANUAL PAGES XXGDB(1.08) 401 402 403 404 !%^&*()+=~|;:{},/#<? 405 406 stop_color 407 Color of the stop sign. (Red) 408 409 arrow_color 410 Color of the arrow sign. (Blue) 411 412 updown_color 413 Color of the updown sign. (Blue) 414 415 bomb_color 416 Color of the bomb sign. (Red) 417 418 dataDpyMaxHeight 419 Maximum height of the data display window. (300) 420 421 dataDpyMaxWidth 422 Maximum width of the data display window. (600) 423 424 prompt 425 The prompt string used in xxgdb. ("(xxgdb) ") 426 427 db_name 428 The name of the debugger program. ("gdb") 429 430 db_prompt 431 The prompt string of the debugger program. ("(gdb) ") 432 433 nx If True, xxgdb will not execute .gdbinit at start-up. 434 (False) 435 436FILES 437 a.out default object file 438 core default core file 439 ~/XDbx resources file (or /usr/lib/X11/app-defaults/XDbx) 440 .gdbinit local initial commands file 441 ~/.gdbinit user's initial commands file 442 443SEE ALSO 444 X(1), gdb(1) 445 446COPYRIGHT 447 Copyright 1989 The University of Texas at Austin. Copyright 448 1990 Microelectronics and Computer Technology Corporation. 449 Copyright 1990-1993 Thomson Consumer Electronics, Inc. 450 451AUTHOR 452 Po Cheung. Pierre Willard. 453 454 455 456 457 458 459X Version 11 Last change: November 1993 7 460 461 462 463