HP 5992-4701 - Manuals
HP 5992-4701 – Manual in PDF format online.
Manuals:
Manual HP 5992-4701
Summary
Table of Contents Summary of GDB ........................................................................................................................ 15 Free Software......................................................................................................................15Contributo...
14.10.8 Scenarios in memory debugging.....................................................................174 14.10.8.1 Stop when freeing unallocated or deallocated blocks.............................17414.10.8.2 Stop when freeing a block if bad writes occurred outside blockboundary....................
20.7 Errors.........................................................................................................................30220.8 Information on breakpoints.......................................................................................30220.9 Invalidation notices......................
List of Tables 14-1 Memory Debugging Commands in Interactive and Batch Mode.............................177 16-1 Invocation commands...............................................................................................254 16-2 Window mode commands...............................................
List of Examples 14-1 Sample Output for the find command....................................................................198 14-2 Sample Commands to Print NaT Registers...............................................................214 14 List of Examples
Summary of GDB The purpose of a debugger such as GDB is to allow you to see what is going on “inside”another program while it executes―or what another program was doing at the momentit crashed. GDB allows you to do the following: • Load the executable along with any required arguments. • Stop your p...
1 A Sample GDB Session This chapter describes the most common GDB commands with the help of an example. The following topics are discussed: • Loading the Executable • Setting the Display Width • Setting Breakpoints • Running the Executable under GDB • Stepping to the next line • Stepping into a Subr...
$ (gdb) m4 HP gdb 3.0 for PA-RISC 1.1 or 2.0 (narrow), HP-UX 11.00.Copyright 1986 - 2001 Free Software Foundation, Inc.Hewlett-Packard Wildebeest 3.0 (based on GDB ) is covered by theGNU General Public License. Type "show copying" to see the conditions tochange it and/or distribute copies. T...
2 Getting In and Out of GDB This chapter discusses how to start GDB, and exit out of it. The essentials are: • type '(gdb)' to start GDB. • type quit or C-d to exit. 2.1 Invoking GDB Invoke GDB by running the program ( gdb ). Once started, GDB reads commands from the terminal until you tell it to ex...
' -n '). Exit with nonzero status if an error occurs in executing the GDB commands in the command files. Batch mode may be useful for running GDB as a filter,for example to download and run a program on anothercomputer; in order to make this more useful, the message Program exited normally. (which i...
' xdb_trans.html ', which is usually installed in the directory /opt/langtools/wdb/doc on HP-UX systems. -interpreter interp Use the interpreter interp for interface with thecontrolling program or device. This option is meant tobe set by programs which communicate with GDB usingit as a back end. For...
3 GDB Commands You can abbreviate a GDB command to the first few letters of the command name, ifthat abbreviation is unambiguous; and you can repeat certain GDB commands bytyping just RET ). You can also use the TAB key to get GDB to fill out the rest of a word in a command (or to show you the alt...
4 Running Programs Under GDB When you run a program under GDB, you must first generate debugging informationwhen you compile it using compiler option cc -g -O . You may start GDB with its arguments, if any, in an environment of your choice. Ifyou are doing native debugging, you may redirect your pro...
program. See “Program Input and Output” (page 43) . WARNING! You can redirect input and output, but you cannot use pipes to pass the output ofthe program you are debugging to anotherprogram; if you attempt this, GDB is likely towind up debugging the wrong program. NOTE: • When you issue the run comm...
You can use the string '$cwd' to refer to whatever is the current working directory atthe time GDB searches the path. If you use '.' instead, it refers to the directory whereyou executed the path command. GDB replaces '.' in the directory argument (with the current path) before adding directory to t...
NOTE: • You can redirect your program input and output using shell redirection with the run command. For example, run > outfile starts your program, diverting its output to the file ' outfile '. • An explicit redirection in run overrides the tty command's effect on the input/output device, but no...
NOTE: • To use attach , your program must be running in an environment which supports processes; for example, attach does not work for programs on bare-board targets that lack an operating system. • You must also have permission to send the process a signal. • When you use attach , the debugger find...
On some operating systems, a program cannot be executed outside GDB while youhave breakpoints set on it inside GDB. You can use the kill command in this situation to permit running your program outside the debugger. The kill command is also useful if you wish to recompile and relink your program, si...
threadno is the internal GDB thread number, as shown in the first field of the ' info threads ' display. To apply a command to all threads, use thread apply all args. Whenever GDB stops your program, due to a breakpoint or a signal, it automaticallyselects the thread where that breakpoint or signal ...
set follow-fork-mode mode Set the debugger response to a program call of fork or vfork . A call to fork or vfork creates a new process. The mode can be: parent The original process is debugged aftera fork. The child process runsunimpeded. This is the default. child The new process is debugged after ...
5 Stopping and Continuing The principal purpose of a debugger is to let you stop your program before it terminatesabnormally or runs into trouble, so that you can investigate and determine the reason. Inside GDB, your program can stop for several reasons, such as a signal, a breakpoint,or reaching a...
5.1.3 Deleting breakpoints It is often necessary to eliminate a breakpoint, watchpoint, or catchpoint once it hasdone its job and you no longer want your program to stop there. This is called deletingthe breakpoint. A breakpoint that has been deleted no longer exists; it is forgotten. With the clear...
say, to just set a watchpoint on a variable name, and specify a condition that testswhether the new value is an interesting one. Break conditions can have side effects, and may even call functions in your program.This can be useful, for example, to activate functions that log program progress, or to...
You can use breakpoint commands to start your program up again. Simply use the continue command, or step , or any other command that resumes execution. Any other commands in the command list, after a command that resumes execution,are ignored. This is because any time you resume execution (even with...
When this message is printed, you need to disable or remove some of thehardware-assisted breakpoints and watchpoints, and then continue. 5.2 Continuing and stepping Continuing means resuming program execution until your program completes normally.In contrast, stepping means executing just one more “...
NOTE: Use caution if you disable all signals from certain processes. Disabling ' SIGTRAP ' in your program may cause your program to hang. HP-UX uses ' SIGTRAP ' to communicate with the debugger. If you disable all signals from certain processes so that signals will be delivered to the right process...
pass GDB should allow your program to see this signal; your program canhandle the signal, or else it may terminate if the signal is fatal and nothandled. nopass GDB should not allow your program to see this signal. When a signal stops your program, the signal is not visible to the program until youc...
6 Examining the Stack When your program has stopped, the first thing you need to know is where it stoppedand how it got there. Each time your program performs a function call, information about the call is generated.The information includes the location of the call in your program, the arguments oft...
The names where and info stack (abbreviated info s ) are additional aliases for backtrace . Each line in the backtrace shows the frame number and the function name. The programcounter value is also shown―unless you use set print address off . The backtrace also shows the source file name and line nu...
NOTE: • On the SPARC architecture, frame needs two addresses to select an arbitrary frame: a frame pointer and a stack pointer. • On the MIPS and Alpha architecture, it needs two addresses: astack pointer and a program counter. • On the 29k architecture, it needs three addresses: a register stackpoi...
7 Examining Source Files GDB can print parts of the source code of your program, since the debugginginformation recorded in the program tells GDB what source files were used to buildit. When your program stops, GDB spontaneously prints the line where it stopped.Likewise, when you select a stack fram...
The following arguments can be given to the list command: list linespec Print lines centered around the line specified by linespec . list first,last Print lines from first to last . Both arguments must be linespecs. list, last Print lines ending with last . list first, Print lines starting with firs...
reverse-search regexp The command ' reverse-search regexp ' checks each line, starting with the one before the last linelisted and going backward, for a match for the regexp . It lists the line(s) that is found. You can abbreviate this command as rev . 7.3 Specifying source directories Executable pr...
show directories Print the source path and display the directories itcontains. If your source path is cluttered with directories that are no longer of interest, GDB canend up detecting the wrong version of the source. To correct this situation, follow thesesteps: 1. Use directory with no arguments t...
8 Examining Data The usual way to examine data in your program is with the print command (abbreviated p ), or its synonym inspect . It evaluates and prints the value of an expression of the language your program is written in (see Chapter 9 (page 101) ). The following forms of print command are supp...
:: ' :: ' allows you to specify a variable in terms of the file or function where it is defined. See “Program variables” (page 84) . {type} addr Refers to an object of type type stored at address addr in memory. addr may be any expression whose value is an integer or pointer (but parentheses are req...
This use of ' :: ' is very rarely in conflict with the very similar use of the same notation in C++. GDB also supports use of the C++ scope resolution operator in GDB expressions. WARNING! Occasionally, a local variable may appear to have the wrong value at certain points in a function just after en...
p *array@len The left operand of ' @ ' must reside in memory. Array values made with ' @ ' in this way behave just like other arrays in terms of subscripting, and are coerced to pointers whenused in expressions. Artificial arrays most often appear in expressions via the valuehistory (see “Value hist...
available for use in expressions in the convenience variable $_ . The contents of that address, as examined, are available in the convenience variable $__ . If the x command has a repeat count, the address and contents saved are from the last memory unit printed; this is not the same as the last add...
set print address off Do not print addresses when displaying theircontents. For example, this is the same stack framedisplayed with set print address off : ((gdb)) set print addr off((gdb)) f#0 set_quotes (lq="<<", rq=">>") at input.c:530530 if (lquote != def_lquote) You ...
} form;}; struct thing foo = {Tree, {Acorn}}; with set print union on in effect ' p foo ' would print $1 = {it = Tree, form = {tree = Acorn, bug = Cocoon}} and with set print union off in effect it would print $1 = {it = Tree, form = {...}} These settings are of interest when debugging C++ programs:...
re-read or discarded (for example with the file or symbol-file commands). When the symbol table changes, the value history is discarded, since the values may containpointers back to the types defined in the symbol table. The values printed are given history numbers by which you can refer to them. Th...
Some registers have distinct raw and virtual data formats. This means that the dataformat in which the register contents are saved by the operating system is not the sameone that your program normally sees. For example, the registers of the 68881 floatingpoint coprocessor are always saved in “extend...
9 Using GDB with Different Languages Although programming languages generally have common aspects, they are rarelyexpressed in the same manner. For instance, in ANSI C, dereferencing a pointer p is accomplished by *p , but in Modula-2, it is accomplished by p^ . Values can also be represented (and d...
' .cxx ', ' .c++ ' ' .f ', ' .F ', ' .f90 ' Fortran source file. GDB does not distinguish between Fortran 77 and Fortran90 files. ' .s ', ' .S ' Assembler source file. This actually behaves almost like C, but GDB doesnot skip over function prologues when stepping. In addition, you may set the langua...
9.2 Displaying the language The following commands help you find out which language is the working language,and also what language source files were written in. show language Display the current working language. This is the language youcan use with commands such as print to build and compute expres...
For expressions you use in GDB commands, you can tell GDB to treat range errors inone of three ways: ignore them, always treat them as errors and abandon the expression,or issue warnings but evaluate the expression anyway. A range error can result from numerical overflow, from exceeding an array ind...
10 Examining the Symbol Table The commands described in this chapter allow you to inquire about the symbols (namesof variables, functions, and types) defined in your program. This information is inherentin the text of your program and does not change as your program executes. GDB findsit in your pro...
11 Altering Execution Once you think you have found an error in your program, you might want to find outfor certain whether correcting the apparent error would lead to correct results in therest of the run. You can find the answer by experiment, using the GDB features foraltering execution of the pr...
((gdb)) p g$1 = 1((gdb)) set g=4((gdb)) p g$2 = 1((gdb)) r The program being debugged has been started already.Start it from the beginning? (y or n) yStarting program: /home/smith/cc_progs/a.out"/home/smith/cc_progs/a.out": can't open to read symbols:Invalid bfd target. ((gdb)) show gThe cur...
or of local variables. For this reason, the jump command requests confirmation if the specified line is not in the function currentlyexecuting. However, even bizarre results are predictable if youare well acquainted with the machine-language code of yourprogram. jump *address Resume execution at the...
return , return expression You can cancel execution of a function call with the return command. If you give an expression argument, its value is used as the return value from the function value. When you use return , GDB discards the selected stack frame (and all frames within it). You can think of ...
show write Display whether executable files and core files are opened forwriting as well as reading. 11.6 Patching programs 123
12 GDB Files GDB needs to know the file name of the program to be debugged, both in order to readits symbol table and in order to start your program. To debug a core dump of a previousrun, you must also tell GDB the name of the core dump file. 12.1 Commands to specify files You can specify executabl...
filename means to discard information on theexecutable file. symbol-file [ filename ] Read symbol table information from file filename.PATH is searched when necessary. Use the filecommand to get both symbol table and programto run from the same file. symbol-file with no argument clears out GDBinform...
To do this, use the kill command (see “Killing the child process” (page 45) ). add-symbol-file filename address , add-symbol-file The add-symbol-file command reads additionalsymbol table information from the file filename.You would use this command when filename filename address [ -readnow ] has bee...
show auto-solib-add Display the current autoloading size threshold,in megabytes. 12.2 Specifying shared library locations On HP-UX, when the shared libraries your program uses are in a different directorythan the path specified in the source or object files, specify the correct files to use withone ...
13 Specifying a Debugging Target A target is the execution environment occupied by your program. Often, GDB runs in the same host environment as your program; in that case, thedebugging target is specified as a side effect when you use the file or core commands. For HP-UX specific information, see u...
names or host names to connect with, processnumbers, and baud rates. The target command does not repeat if you press RET again after executing the command. help target Displays the names of all targets available. Todisplay targets currently selected, use either infotarget or info files (see “Command...
target sim Builtin CPU simulator. GDB includes simulators formost architectures. In general,the following commandswork: target sim load run However, you cannot assume that a specific memorymap, device drivers, or even basic I/O is available,although some simulators do provide these. Some configurati...
14 HP-UX Configuration-Specific Information While nearly all GDB commands are available for all native and cross versions of thedebugger, there are some exceptions. This chapter describes features, commands and,enhancements available only on HP-UX. 14.1 Summary of HP Enhancements to GDB WDB provides...
• Support for evaluating macros. • Support for printing the execution path entries in the current frame, or thread. • New Command for Searching a Pattern in the Memory Address Space • New Option to Limit the Number of Frames Unwound • Updated Procedure to Process the Initialization File • Enhancemen...
14.3 Supported Platforms and Modes • Supported Platforms HP WDB supports source-level debugging of programs written in HP C, HP aC++,and Fortran 90 on Integrity systems running on HP-UX 11i v2 or later and PA-RISC systems running HP-UX 11i v1 and later. • Support for assembly-level debugging HP WDB ...
NOTE: HP WDB cannot be attached to a process that is traced by tools which use ttrace, such as Caliper, adb, and tusc. The debugger displays the following error messageon attempting to attach to such a process: Attaching to process <pid> failed. Hint: Check if this process is already being tra...
n/a /opt/langtools/ bin $WDB_ROOT/bin librtc.sl location n/a GDB_SERVER $WDB_ROOT/bin None $LIBRTC_SERVER n/a $WDB_ROOT/lib /opt/langtools/ bin NOTE: If you define WDB_ROOT or GDB_ROOT but do not create the correct directory structure below it, the debugger may fail. 14.6 Specifying object file dire...
The advantages include: • You do not have to recompile and relink the entire program. • You do not have to reload the program into the debugger. • You can resume execution of the program from the x location. • You can speed up the development cycle. NOTE: Fix and Continue is only supported with the ...
NOTE: You must rebuild the program after you use the fix command because the changes you make are temporarily patched into the executable image. The changes arelost if you load a different executable and are not re ected in the original executablewhen you exit the debugger. 14.7.4 Example Fix and Co...
3. You can use the following commands for debugging inline functions in HP 9000systems: step next list backtrace frame <n> info locals info args The following commands are not available for debugging inline functions in HP9000 systems: breakpoint info frame disassembly NOTE: Inline debugging c...
(gdb) set inline-debug inline_bp_all or$ gdb --inline = inline_bp_all • To set and modify individual breakpoints on specific instances of inlinefunctions and enable inline debugging, enter either of the following commandsbe- fore debugging the application: (gdb) set inline-debug inline_bp_individual...
HP WDB offers the following memory-debugging capabilities: • Reports memory leaks • Reports heap allocation profile • Stops program execution if bad writes occur with string operations such as strcpy and memcpy • Stops program execution when freeing unallocated or de-allocated blocks • Stops program...
info leaks filename Writes the complete leak report output to thespecified file. info leak leaknumber Produces detailed information on the specifiedleak including the allocation call stack. set heap-check block-size num-bytes Instructs WDB to stop the program whenever ittries to allocate a block lar...
frame_count=no_frames (or) set heap-check frame-count <no_frames> Sets the number of frames to be printed for leakcontext. min_heap_size=block_size (or) set heap-check min-heap-size <block_size> Sets the minimum block size to use for heapreporting. min_leak_size=block_size (or) set heap-...
LD_PRELOAD=/opt/langtools/lib/librtc.sl <executable> – For 64-bit IPF applications, LD_PRELOAD=/opt/langtools/lib/pa20_64/librtc.sl <executable> If LD_PRELOAD and chatr +rtc are used to preload the librtc runtime library , the librtc runtime library is loaded from the path specified by L...
2. Run the program. 3. Start a debugging session as follows: gdb -leaks <executable-name> <process-id> 4. Use info heap and info leaks commands to obtain a memory analysis report of the application. NOTE: From HP WDB 5.7 onwards, the archive version of the run time check library, librtc....
Syntax: info corruption [<file name>] The run time memory checking must be enabled before using the info corruption command to detect memory corruption. The corruption information is written to a filespecified in the .file name argument if provided. Otherwise, it is printed to the stdout . NOT...
show heap-check Displays all current settings for memorychecking. 14.10.10.2 info heap arena The info heap arena command enables the user to view high level memory usage details of each arena. The info heap arena is not supported in batch mode. This command is available only for applications running...
4. When the program is stopped at a breakpoint, use the info heap command: (gdb) info heap Analyzing heap ...doneActual Heap Usage:Heap Start = 0x40408000Heap End = 0x4041a900Heap Size = 76288 bytesOutstanding Allocations:41558 bytes allocated in 28 blocks No. Total bytes Blocks Address Function0 34...
set heap-check high-mem-count X_number Stops when brk() value has moved X_number of times. Limitations: • This feature assumes that an application has a deterministic memory allocationpattern from one run to another. • The high_mem feature is not supported in batch mode debugging. 14.11 Thread Debug...
num-waiters [num] The set thread-check num-waiters [num] command checks if the number of threads waiting on any pthread object exceeds thespecified threshold number [num] . The debugger transfers the execution control to the user andprints a warning message when this condition isdetected. 14.11.3.3 ...
$ chatr +dbg enable ./<executable> (This step is not required on Integrity systems.) To explicitly preload the librtc runtime library and start the target application,enter one of the following commands: — For 32 bit IPF applications, LD_PRELOAD=/opt/langtools/lib/hpux32/librtc.so <executab...
NOTE: Use the set frame-count setting in the rtconfig file to control the depth of the stack trace file. This command controls the depth of the call stack collected. Largervalues increase the run time. 14.11.5.1 Pre-requisites for Batch mode of Thread Debugging The various prerequisites for Batch mo...
NOTE: The configuration file contains lines of the following form: set thread-check [on|off] | [option] [on|off] | [option] [num] And/Or set frame-count [num] And/Or files=<name of the executable on which the thread checking is to be done> For more information, see “Enabling and Disabling Adva...
If LD_PRELOAD and chatr +rtc are used to preload the librtc runtime library , the librtc runtime library is loaded from the path specified by LD_PRELOAD . If HP WDB detects any thread error condition during the application run, the errorlog is output to a file in the current working directory. The o...
Behavior of the +check=thread option can be changed by users by providing their own rtcconfig file. The user specified rtcconfig file can be in the current directory or in a directory specified by the GDBRTC_CONFIG environment variable. If any thread error condition is detected during the applicatio...
14.13 Debugging multiple processes ( programs with fork and vfork calls) 14.13.1 Ask mode for set follow-fork-mode The ask command prompts the user to select between parent and child as the debuggerresponse to a program call of fork/vfork . Based on the user selection, the parent or the child proces...
0x40172b27: (b2) P3lc_gr gr=400x40172b29: (61) R3body rlen=330x40172b2b: (81) B1label_state label=10x40172b2c: (c0) B2epilogue t=440x40172b2e: (00) R1prologue rlen=00x40172b2f: (00) R1prologue rlen=0 14.13.4 Printing CFM and PFS registers On Integrity systems, HP WDB prints Current Frame Marker (CFM...
the core file to be used if the packcore directory does not contain a core file. If used,this second argument causes a symbolic link to be created in the packcore directory inplace of the missing core file. The getcore command can be used to examine a packcore directory which was previously created ...
NOTE: Limitations for the enhanced info target command on corefile are as follows:• The enhanced info target command is not supported when the expanded_node_host_names kernel parameter is set. It is supported only for thedefault utsname . • The heap segment listed in the memory segment does not cont...
To analyze this core file with HP WDB on HP-UX 11i version 2, you must do thefollowing: • When starting from HP WDB command line: (gdb) core-file [core.pid | core-filename] • When starting from shell prompt: $ gdb -core a.out [core.pid | core-filename] 14.15.4 Support for display of run time type in...
For example, (gdb) i ep 4 10 • info exec-path summary Prints the summary information about all the local execution path entries in thecurrent frame. This command displays the total number of branches for the frame,the number of branches executed in this frame in the last iteration, and the lastexecu...
For more information on this feature, see the following example. 14.16.2 Example Illustrating Execution Path Recovery The following example illustrates the use of the execution path recovery feature in HPWDB: Sample Program: $cat execpath.c#include <stdio.h>#include <string.h>#include &l...
14.18 Invoking GDB Before a Program Aborts This -crashdebug option enables GDB to monitor the execution of a process or a program. It invokes GDB when the program execution is about to abort. Once thedebugger is invoked, you can debug the application using the normal debuggercommands. This option en...
Abort gdb command line call? (y or n) y#0 main () at ./address_error.c:4141 fun (count, count*1.1);(gdb) bt#0 main () at ./address_error.c:41(gdb) quitThe program is running. Exit anyway? (y or n) y 14.20 Instruction Level Stepping During instruction level stepping with nexti and stepi, WDB prints t...
14.21.3.1 Setting breakpoints in unstripped shared library GDB will not be able to put breakpoints using symbolic names(of the symbols not inexport list) or line numbers in the stripped modules. GDB will be able to place breakpoints using symbol names in the unstripped sharedlibraries loaded into th...
Setting a breakpoint on a template method with multiple instantiations displays a menushowing all instantiations and the user can choose to set breakpoints on all or any oneor none. For example, (gdb) file testReading symbols from test...done.(gdb) b MyClass::MyMember[0] cancel[1] all[2] MyClass::My...
14.22.2 Setting Deferred Breakpoints in Shared Library On HP-UX, GDB automatically loads symbol definitions from shared libraries whenyou use the run command, or when you examine a core file. (Before you issue the runcommand, GDB does not understand references to a function in a shared library| unle...
To set the breakpoint you must kill the program and then rerun it so that the dynamiclinker maps a copy of the shared library privately. There are two ways to run theprogram: • Rerun the program under GDB to have the debugger cause dld to map all sharedlibraries as private, enabling breakpoint debug...
The -mapshared option is implemented on both PA-RISC and Itanium platforms in HP WDB 5.2. This option is provided in the WDB GUI and HP WDB. The defaultbehavior does not change if the -mapshared option for all shared libraries in processes started under the debugger, or dynamically loaded after an a...
14.23.1.1 Printing Decimal floating point constant (gdb) print <num><df/dd/dl/DF/DD/DL>df, DF - _Decimal32dd, DD - _Decimal64dl, DL - _Decimal128 This prints the decimal floating point constant based on the data type. 14.23.1.2 Printing Decimal floating point variable (gdb) print/<fmt...
Conversion of types: GDB handles conversion of data types during assignment, printing, and arithmeticand comparison operation. (gdb) p 1.2df +1.2dd This converts double data type (1.2) to _Decimal64 data type and performs addition operation with _Decimal64 data type (1.2dd) and prints value in _Deci...
Additional stack unwind features are available starting with SDK 1.4.2. These featuresfall into three categories: Java stack unwind enhancements, Java heap support, andJava threads support. These additional features are available as part of the Java stack unwind enhancements: • View Java compiled fr...
Java VM Debugging Commands The following commands have been added to enhance Java debugging support: brbacktrace Prints backtrace of mixed Java and native frames. Standardbacktrace command of GDB has been enhanced to work with mixedJava and native stack frames. info frame Prints Java frame specific ...
14.25.1.3 Java corefile debugging support HP WDB shows stack traces of mixed Java, C, and C++ programs for java corefile. GDB_JAVA_UNWINDLIB environment variable must be set to the path name of the Java unwind library as explained above. Following are examples that illustrate the gdb command-line op...
2. Attach gdb to the running process: $ gdb -p 23989 HP gdb 5.0 for HP Itanium (32 or 64 bit) and target HP-UX 11.2x.Copyright 1986 - 2001 Free Software Foundation, Inc.Hewlett-Packard Wildebeest 5.0 (based on GDB) is covered by theGNU General Public License.Type "show copying" to see the co...
/* off 453 bits, len 27 bits */float f;/* off 480 bits, len 32 bits */ 14.25.3 Support for _ _fpreg data type on IPF WDB internally converts __fpreg data type to long double data type to evaluate an expression or to print the value of the expression. Since long double data type has only15 bit expone...
You do not need to use fully qualified names to access symbols within a namespace.The debugger can compile a list of namespaces active in the scope that you are in and,when possible, choose an appropriate symbol. The debugger recognizes using declarations, using directives, namespace aliases, nested...
14.27 Support for output logging The Visual Interface for HP WDB terminal user interface (TUI) mode supports thecommand, log logfile_name , that saves the content of a session to the specified log file. When you use the log command, the debugger saves a snapshot of the current session, from the star...
"Steplast is not meaningful for the current line." For example, (gdb) 4 int k = 10; (gdb) sl ---> alias to "steplast" command error: Steplastis not meaningful for the current line To execute the steplast command in C++ compiled applications, you must compile the application using ...
14.29.1 Debugging Optimized Code at Various Optimization Levels The following sections describe debugging optimized code support at each optimizationlevel. 14.29.1.1 +O0 and +O1 At +O1 level, optimizations that affect the user visible state of a program are avoided. Line numbers are accurately assoc...
execution pattern and translates only the frequently executed code into native Itanium(R)code at runtime. 14.30.1 Debugging the application using GDB under ARIES ARIES supports debugging of HP 9000 HP-UX applications on HP-UX 11i Integrityservers using the HP 9000 HP-UX GDB. • Both the GDB and the a...
identically. The exact behavior shown by HP 9000 GDB under ARIES may differfrom that on a HP 9000 HP-UX server. • If the debugged process is blocking in a system call, any attempt to get to the GDBcommand prompt by pressing ctrl-C does not work. The process needs to be killedfrom a different shell. ...
14.31 Visual Interface for WDB WDB includes an HP-supported Visual Interface for WDB with both graphical andterminal modes. The interface is based on Vim 5.7 and WDB. This interface replacesthe -tui mode on Itanium-based systems. When you use the interface you are actually using vim, which is a vi-c...
(wdb) quit 14.31.2 Navigating the Visual Interface for WDB display The Visual Interface for WDB window consists of two areas: • Source pane at the top • Debugger pane at the bottom You can use the arrow and pagination keys on the keyboard to move the cursor: • Pagination keys move the cursor in the ...
Run Resume Stop Up Visual Finish Print Type List Interface for WDB Faq Stop Next Down Prompt Print* Edit Credits You can click the softkey or press a function key on the keyboard to invoke thecommand. The function keys F1 through F8 correspond to the bottom row of softkeys. The functionkeys F9 and u...
14.31.5 Using the TUI mode To start Visual Interface for WDB in terminal user interface (TUI) mode, run VisualInterface for WDB with the command: /opt/langtools/bin/vdb -tui This mode works well with hpterm and xterm and fairly well with dtterm and VT100 (telnet) terminals. NOTE: A defect in dtterm ...
14.31.7 Using commands to browse through source files browse. For example, CTRL-B , CTRL-F , CTRL-D , CTRL-U are useful for browsing the debugger window. These commands work whether or not you escape to ` vi ' mode. These ` vim ' commands require you to escape to ` vi ' mode. For example: `/' Search...
To save a session to a file: 1. Right-click an empty region of the source or debugger pane. 2. Choose "Save Session to vdb.pid" from the pop-up menu. The debugger writes the input and output to a file whose name ends in the pid of thedebugger. If you save the session more than once, the new ...
14.35.2.2 For 64-bit applications To perform command line calls in a stripped executable, linked with end.o , you need to do the following: • In the +std link mode, GDB supports this feature without any changes. You must export the __wdb_call_dummy symbol as shown in the next line. • In the +compat ...
14.36 Displaying the current block scope information The which command takes a symbol as an argument and prints the information on a given symbol. It prints the following information: • current block scope addresses • line information of the definition of the symbol • filename in which the definitio...
15 The HP-UX Terminal User Interface By default, GDB runs in line mode. For users who prefer an interface similar (thoughnot identical) to that of the XDB debugger, HP provides a terminal user interface (TUI),which appears when you invoke the gdb command with the -tui option. Use the -xdb option to ...
When you execute the program up to the first breakpoint by issuing the command run a right angle bracket (>) points to the current location. So after you issue thosecommands, the window looks something like this: |----------------------------------------------------------------------| |27 } | |28...
The Command pane is always present. The possible configurations of the other panesare: • Source • Disassembly • Source/Disassembly • Disassembly/Register • Source/Register The layout command (abbreviated la ) enables you to change from one window configuration to another. NOTE: You can abbreviate an...
15.3.3 Source/Disassembly pane The Source/Disassembly pane appears when you issue the command: la split You can also reach this pane from the Source pane with the XDB command: td The window looks like this: :......................................................................:*>:32 print_averag...
|;;; print_average (my_list, first, last); |*> |0x3524 <main+8> addil L'-0x800,%dp,%r1 | |0x3528 <main+12> ldo 0x730(%r1),%r26 | |0x352c <main+16> ldi 9,%r24 | |0x3530 <main+20> ldi 0,%r25 | |0x3534 <main+24> ldil L'0x3000,%r31 | |------------------------------------...
15.4 Cycling through the panes Use the commands la next and la prev to move from one pane to another without specifying a window name. If you specify la next repeatedly, the order the debugger uses is: • Source ( src ) • Disassembly ( asm ) • Source/Disassembly ( split ) • Source/Register • Disassem...
:.........................................................................::flags 29000041 r1 51a800 rp 7f6ce597 ::r3 7f7f0000 r4 1 r5 7f7f06f4 ::r6 7f7f06fc r7 7f7f0800 r8 7f7f0800 ::r9 40006b10 r10 0 r11 40004b78 ::r12 1 r13 0 r14 0 ::r15 0 r16 40003fb8 r17 4 ::.......................................
(gdb) la split(gdb) la regs(gdb) la src(gdb) la regs(gdb) foc nextFocus set to REGS window.(gdb) 15.6 Scrolling panes To scroll within a pane, you can use the arrow keys or the Page Up and Page Down keys (on some keyboards these are Prev and Next ). You can also use the following commands: {+ | -} [...
*>:32 print_average (my_list, first, last); : :33 print_average (my_list, first, last - 3); : :34 } : :35 : :......................................................................:File: average.c Procedure: main Line: 32 pc: 0x3524(gdb) la regs(gdb) la src(gdb) la regs(gdb) foc nextFocus set to R...
winheight [win_name] [+ | -] num_lines If you omit win_name, the pane with logical focus is resized. When you increase theheight of a pane, the height of the Command pane is decreased by the same amount,and vice versa. The height of any other panes remains unchanged. For example, the command wh src ...
16 XDB to WDB Transition Guide This transition aid is designed for XDB users who are learning WDB, an HP-supportedversion of the industry-standard GDB debugger. Select one of these lists for a table thatshows WDB equivalents for many common XDB commands and other features. Invoke WDB with the comman...
Table 16-2 Window mode commands (continued) Meaning WDB Equivalent XDB Command Display general registers gr (with -xdb -tui),display $regs (with -tui) gr Display special registers sr (with -xdb -tui),display $sregs (with-tui) sr Toggle disassembly mode td (with -xdb -tui) td Toggle float register di...
Table 16-3 File viewing commands (continued) Meaning WDB Equivalent XDB Command List source directory search path(list all directories) ld (with -xdb), showdirectories ld List all source files lf (with -xdb), infosources lf List matching files No equivalent lf [string] Repeat previous search fo or r...
Table 16-4 Data viewing and modification commands Meaning WDB Equivalent XDB Command Move view location forward orbackward in source file numberlines l (with -xdb) , info args followed by info locals l Search source forward for [last]string lc [string] (with -xdb) , info common string lc [string] Se...
Table 16-7 Job control commands (continued) Meaning WDB Equivalent XDB Command Go forward or back given # lines g {+ | -}lines (with-xdb) , go {+ | -}lines , tb {+ | -}lines followed by jump {+ | -}lines g {+ | -}lines Go forward or back 1 line g {+ | -} (with -xdb) , go {+ | -}1, tb {+ | -}1 follow...
Table 16-9 Auxillary breakpoint commands Meaning WDB Equivalent XDB Command Print any string p "any string" any_string Conditionally execute cmds if expr cmds [else cmds]end if expr {cmds} [{cmds}] Quiet breakpoints Q (with -xdb) , silent (must be first command in a commandslist) Q 16.2.2 Br...
Table 16-13 Macro facility commands Meaning WDB Equivalent XDB Command Define a user-defined command def name [GDB prompts for commands] def name replacement-text Toggle the macro substitutionmechanism No equivalent tm Remove the macro definition forname def name [follow with empty command list] und...
Table 16-15 Miscellaneous commands (continued) Meaning WDB Equivalent XDB Command Invoke a shell ! cmd line (with -xdb), she cmd line ! cmd line Execute command list (groupcommands) commands [number] ... end {cmd list} Interrupt the program Control-C Control-C A comment # [text] # [text] Activate mo...
Table 16-16 Data format commands (continued) Meaning WDB Equivalent XDB Command Decimal integer d d Long decimal integer d D (1) e Floating-point notation as float No equivalent e e Foating-point notation as double No equivalent E (1) f floating-point notation as float No equivalent f f floating-poi...
Table 16-16 Data format commands (continued) Meaning WDB Equivalent XDB Command Print in binary t z Print in long binary t Z (1) (1) HP WDB will display data in the size appropriate for the data. It will not extendthe length displayed in response to one of the uppercase formchars (for example, O,D, ...
Table 16-18 Special language operators Meaning WDB Equivalent XDB Language Operator Unary operator, address of object Depends on language $addr Unary Boolean operator, executionin procedure No equivalent $in Unary operator, size of object sizeof $sizeof 16.6 XDB special variables and HP WDB equivale...
16.7 XDB variable identifiers and HP WDB equivalents Table 16-20 Variable Identifiers Meaning WDB Equivalent XDB Variable Identifier Search for var var var Search class for var (bug: not yet) class:: class:: Search proc for var (static variables only) proc:: var [[class]::]proc:[class::]var Search p...
17 Controlling GDB You can alter the way GDB interacts with you by using the set command. For commandscontrolling how GDB displays data, see “Print settings” (page 90) . Other settings are described here. 17.1 Setting the GDB Prompt GDB indicates its readiness to read a command by printing a string ...
show commands Display the last ten commands in the commandhistory. show commands n Print ten commands centered on commandnumber n . show commands + Print ten commands just after the commands lastprinted. 17.4 Setting the GDB Screen Size Certain commands to GDB may produce large amounts of informatio...
set radix 0xa sets the base to decimal. On the other hand, set radix 10 leaves the radix unchanged no matter what it was. set output-radix base Set the default base for numeric display. Supportedchoices for base are decimal 8, 10, or 16. base must itself be specified either unambiguously or using th...
set confirm on Enables confirmation requests (the default). show confirm Displays state of confirmation requests. 17.7 Optional messages about internal happenings set debug arch Turns on or off display of gdbarch debugging info. The default is off show debug arch Displays the current state of displa...
show debug varobj Displays the current state of displaying GDB variableobject debugging info. 286 Controlling GDB
18 Canned Sequences of Commands In addition to breakpoint commands (see “Breakpoint command lists” (page 61) ), GDB provides the following two ways to store sequence of commands for execution as aunit: • user-defined commands • command files 18.1 User-defined commands A user-defined command is a seq...
enddefine hook-continuehandle SIGLARM passend You can define a hook for any single-word command in GDB, and not for commandaliases; Also you should define a hook for the basic command name, for example, backtrace rather than bt . If an error occurs during the execution of your hook, execution of GDB...
• VxWorks (Wind River Systems real-time OS): .vxgdbinit • OS68K (Enea Data Systems real-time OS): .os68gdbinit • ES-1800 (Ericsson Telecom AB M68000 emulator): .esgdbinit You can also request the execution of a command file with the source command: source filename Execute the command file filename ....
not entered in the value history either. See “Expressions” (page 83) . output/fmt expression Print the value of expression in format fmt . You can use the same formats as for print. See “Output formats” (page 86) . printf string , expressions ... Print the values of the expressions under the control...
19 Using GDB under gnu Emacs A special interface allows you to use gnu Emacs to view (and edit) the source files forthe program you are debugging with GDB. To use this interface, use the command M-x gdb in Emacs. Give the executable file youwant to debug as an argument. This command starts GDB as a ...
20 GDB Annotations This chapter describes annotations in GDB. Annotations are designed to interface GDBto graphical user interfaces or other similar programs which want to interact with GDBat a relatively high level. 20.1 What is an annotation? To produce annotations, start GDB with the --annotate=2...
command history, nor will it affect GDB's notion of which command to repeat if RET is pressed on a line by itself. The server prefix does not affect the recording of values into the value history; to printa value without recording it into the value history, use the output command instead of the prin...
where source-intro-string separates for the user's benefit the reference from the text which precedes it, filename is the name of the source file, and line-number is the line number within that file (the first line is line 1). If GDB prints some information about where the frame is from (which libra...
^Z^Zpre-prompt^Z^Zprompt^Z^Zpost-prompt The input types are:prompt When GDB is prompting for a command (the main GDBprompt). commands When GDB prompts for a set of commands, like in thecommands command . The annotations are repeated for each command which is input. overload-choice When GDB wants the...
21 The GDB/MI Interface Function and purpose GDB/MI is a line based machine oriented text interface to GDB. It is specifically intended to support the development of systems which use the debugger as just one smallcomponent of a larger system. This chapter is a specification of the GDB/MI interface....
Notes: • The CLI commands are still handled by the MI interpreter; their output is described below. • The token , when present, is passed back when the command finishes. • Some MI commands accept optional arguments as part of the parameter list. Each option is identified by a leading `-' (dash) and ...
21.1.3 Simple examples of GDB/MI interaction This subsection presents several simple examples of interaction using the GDB/MI interface. In these examples, ' -> ' means that the following line is passed to GDB/MI as input, while ' <- ' means the output received from GDB/MI . Evaluate expressio...
21.3 GDB/MI output records 21.3.1 GDB/MI result records In addition to a number of out-of-band notifications, the response to a GDB/MI command includes one of the following result indications: "^done" [ "," results ] The synchronous operation was successful, results are the return va...
Note the line breaks shown in the examples are here only for readability. They do notappear in the real output. Also note that the commands with a non-available example(N.A.) are not yet implemented. Motivation The motivation for this collection of commands. Introduction A brief introduction to this...
hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignme...
^done,BreakpointTable=nr_rows="1",nr_cols="6",hdr=[width="3",alignment="-1",col_name="number",colhdr="Num",width="14",alignment="-1",col_name="type",colhdr="Type",width="4",alignment="-1",col_name="di...
^done,asm_insns=[src_and_asm_line={line="31",file="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb/ \testsuite/gdb.mi/basics.c",line_asm_insn=[{address="0x000107bc",func-name="main",offset="0",inst="save %sp, -112, %sp"}]},src_and_asm_line={line="3...
(gdb)-data-list-register-names^done,register-names=["r0","r1","r2","r3","r4","r5","r6","r7","r8","r9","r10","r11","r12","r13","r14","r15","r16","r17","r...
' word-format ' The format to be used to print the memory words. The notationis the same as for GDB print command (see “Output formats” (page 86) ). ' word-size ' The size of each memory word in bytes. ' nr-rows ' The number of rows in the output table. ' nr-cols ' The number of columns in the outpu...
The -environment-pwd command Synopsis -environment-pwd Show the current working directory. GDB command The corresponding GDB command is ' pwd '. Example (gdb)-environment-pwd~Working directory /kwikemart/marge/ezannoni/flathead-dev/devo/gdb.^done(gdb) 21.7 GDB/MI program control Program termination ...
Show version information for GDB. Used mostly in testing. GDB command The corresponding GDB command is ' show version '. Example (gdb)-gdb-version~GNU gdb 5.2.1~Copyright 2000 Free Software Foundation, Inc.~GDB is free software, covered by the GNU General Public License, and~you are welcome to chang...
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="27"},frame={level="4 ",addr="0x000107e0",func="main",file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="32"}](gdb)-stack-list-arguments 0^done,stack-args=[frame={level="0",a...
arguments (inclusive). If the two arguments are equal, it shows the single frame at thecorresponding level. GDB command The corresponding GDB commands are ' backtrace ' and ' where '. Example Full stack backtrace: (gdb)-stack-list-frames^done,stack=[frame={level="0 ",addr="0x0001076c"...
21.10 GDB/MI Symbol query commands The -symbol-info-address command Synopsis -symbol-info-address symbol Describe where symbol is stored. GDB command The corresponding GDB command is ' info address '. Example N.A. The -symbol-info-file command Synopsis -symbol-info-file Show the file for the symbol....
Example N.A. 21.11 GDB/MI Target Manipulation Commands The -target-attach command Synopsis -target-attach pid | file Attach to a process pid or a file file outside of GDB. GDB command The corresponding GDB command is ' attach '. Example N.A. The -target-compare-sections command Synopsis -target-comp...
+download,{section=".text",section-sent="1536",section-size="6668",total-sent="1536",total-size="9880"}+download,{section=".text",section-sent="2048",section-size="6668",total-sent="2048",total-size="9880"}+download,{sec...
The -target-select command Synopsis -target-select type parameters ... Connect GDB to the remote target. This command takes two args: ' type ' The type of target, for instance ' async ', ' remote ', and so on. ' parameters ' Device names, host names and the like. See “Commands for managing targets” ...
^running(gdb)~"0x7f7f0aec"*stopped,reason="end-stepping-range",thread-id="2",frame=addr="0x00002ca4",func="printme",args=[name="ip"],file="multithread.c",line="9"(gdb)-thread-list-ids^done,thread-ids=thread-id="2",thread-id="...
22 Reporting Bugs in GDB Your bug reports play an essential role in making GDB reliable. Reporting a bug may help you by bringing a solution to your problem, or it may not.But in any case the principal function of a bug report is to help the entire communityby making the next version of GDB work bet...
A Installing GDB If you obtain GDB (WDB) as part of the HP ANSI C, HP ANSI C++ Developer's Kit forHP-UX Release 11.x, or HP Fortran, you do not have to take any special action to buildor install GDB.If you obtain GDB (WDB) from an HP web site, you may download either an swinstallpackage or a source ...
gdb-gdb-199991101/mmalloc source for the gnu memory-mapped mallocpackage The simplest way to configure and build GDB is to run configure from the gdb-version-number source directory, which in this example is the gdb-gdb-199991101 directory. First switch to the gdb-version-number source directory if ...
HP Manuals
-
HP CM1312 MFP
Manual
-
HP DV2700
Manual
-
HP 203A
Manual
-
HP 13-2000
Manual
-
HP 1320NW
Manual
-
HP D4360
Manual
-
HP W19Q
Manual
-
HP FC2143
Manual
- HP ZV6000 Manual
-
HP 7500
Manual
-
HP C4591A
Manual
-
HP E4411B
Manual
-
HP N6310
Manual
- HP nx7000 Manual
-
HP DL120
Manual
- HP w1707 Manual
-
HP CV136A#B1H
Manual
-
HP X585z
Manual
-
HP 686714-S01
Manual
- HP 1200 series Manual