dbx is a tool for source-level debugging and execution of programs. It allows you to determine the exact statement that caused a core dump, or to monitor the. A Short User Manual for dbx. “dbx” is the name of the debugger that is available for use on many Unix systems. This document is intended to list the most. There is a fancier X-windows interface for AIX, invoked with the command xde, The dbx debugger is able to track the execution of your program line-by-line in the first at the file containing the main program and is waiting for instructions.
|Published (Last):||23 May 2013|
|PDF File Size:||11.71 Mb|
|ePub File Size:||4.40 Mb|
|Price:||Free* [*Free Regsitration Required]|
The ObjectFile parameter is an object executable file produced by a compiler. Use the -g generate symbol table flag when compiling your program to produce the information the dbx command needs. If the -c flag is not specified, the ax command checks for a. It then checks for a.
Use an editor to create a. If ObjectFile is not specified, then dbx asks for the name of the object file to be examined. The default is a. If the core file exists in the current directory or a CoreFile parameter is specified, then dbx reports the location where the program faulted.
Variables, registers, and memory held in the core image might be examined until execution of ObjectFile begins.
At that point the dbx dbc program prompts for commands. The -B flag is used to specify an alternative object file or a separate. The alternative object file can be specified only while attaching to a process. The debug information is read from this alternate object file or the. This alternate object file must be the unstripped copy of the original object file; otherwise, it will be ignored.
Analyzing core Dumps with the dbx Command in AIX
Use the -B flag when the size of the debug section is large. Use the stripped copy of the object file while running and an unstripped copy while debugging.
If the -B flag is not specified for a stabsplit executable the dbx command will try to acquire the corresponding. The dbx program can display a wide range of expressions. You aid specify expressions in the dbx debug program with C syntax, with some Fortran extensions. The following types of operations are valid in expressions in the debug program:.
Logical and comparison expressions are allowed as conditions in stop and trace. Expression types are checked. You override an expression type by using a renaming or casting operator. The following is an example where the x variable is an integer with value The dbx command provides a command line editing feature similar to the features provided by Korn Shell. These features can be turned on by using dbx subcommand set -o or set edit.
The dbx debugger
Ajx turn on vi-style command line editing, you would type the subcommand set edit vi or set -o vi. The dbx command saves the history of commands, which are entered in the command line, in the. By default, dbx saves the text of the last commands entered. In this example the process ID associated with looper is You can now query and debug the process as if it was originally started with dbx.
The use subcommand might be used for this function once dbx is started. The use command resets the list of directories, whereas the -I flag adds a directory to the list. The -r axi allows you to examine the ,anual of your process in memory even though a core image is not taken. The search wraps around the end of the file. The addcmd subcommand adds dbx subcommands to the specified event.
This specified event is run whenever the breakpoint, tracepoint, or watchpoint corresponding to the event is executed. The event to which the dbx subcommands are to be added can be specified through the Number parameter, or the dbx subcommands can be added to all events by using the all flag.
See clear subcommand, the delcmd subcommand, the delete subcommand, disable subcommand, enable subcommand, the stop subcommand, the status subcommand, and the trace subcommand. Writing and Debugging Programs. The alias subcommand creates aliases for dbx subcommands. The Name parameter is the alias being created. The String parameter is a series of dbx subcommands that, after the execution of this subcommand, can be referred to by Name. If the alias subcommand is used without parameters, it displays all current aliases.
In this example, the alias px prints a value in hexadecimal without permanently affecting the debugging environment. The assign subcommand assigns the value specified by the Expression parameter to the variable specified by the Variable parameter. See Displaying and Modifying Variables. The attribute subcommand displays information about the user thread, mutex, or condition attributes objects defined by the AttributeNumber parameters.
If no parameters are specified, all attributes objects are listed. For each attributes object listed, the aaix information is displayed:. See the condition subcommand, mutex subcommand, print subcommand, and thread subcommand for the dbx command.
The call subcommand runs the procedure specified by the Procedure parameter. The return code is not printed. If any parameters are specified, they are passed to the procedure being run. To call a command while running the dbx command, enter:. The case subcommand changes how the dbx debug program interprets symbols.
The default handling of symbols is based on the current language. Use this subcommand if a symbol needs to be interpreted in a way not consistent with the current language. Entering the case subcommand with no parameters displays the current case mode.
See Folding Variables to Lowercase and Uppercase. The catch subcommand starts the trapping of a specified signal before that signal is sent to the application program.
This subcommand is useful when the application program being debugged handles signals such as interrupts. The signal to be trapped can be specified by number or by name using either the SignalNumber or the SignalName parameter, respectively.
Signal names are case insensitive, and the SIG prefix is optional. If no arguments are specified, the current list of signals to be caught is displayed.
See the ignore subcommand and Handling Signals. The clear subcommand removes all stops at a particular source line. The SourceLine parameter can be specified in two formats:. To remove breakpoints set at line 19enter:. The cleari subcommand and delete subcommand.
The cleari subcommand clears all the breakpoints at the address specified by the Address parameter. See the clear subcommand, the delete subcommand, and Setting and Deleting Breakpoints in in General Programming Concepts: The condition subcommand displays information about one or more condition variables. If one or more ConditionNumber parameters are given, the condition subcommand displays information about the specified condition variables.
If no flags or parameters are specified, the condition subcommand lists all condition variables. See the attribute subcommand, mutex subcommand, print subcommand, and thread subcommand. The cont subcommand continues the execution of the application program from the current stopping point until either the program finishes or another breakpoint is reached.
If a signal is specified, either by the number specified in the SignalNumber parameter or by the name specified in the SignalName parameter, the program continues as if that signal is received. Signal names are not case-sensitive and the SIG prefix is optional.
If no signal is specified, the program continues as if it was not stopped. See the detach subcommand for the dbx command, the goto subcommand for the dbx command, the next subcommand for the dbx command, the aixx subcommand for the dbx command, the step subcommand for the dbx command. The corefile subcommand displays information from the header of a core file, including the executable name, core file format version information, flags indicating which data is available, the signal that caused the crash, and the execution mode of the process that dumped core.
The coremap subcommand displays the mapping of a particular address space region. If you do not specify the region name, the coremap subcommand displays all available mappings.
See the corefile subcommand. The delcmd subcommand removes the dbx subcommands associated with the specified event. The dbx subcommands to be removed can be specified through Number parameters, or all dbx subcommands associated with the manuall event can be removed by using the all flag.
The EventNumber parameter specifies the event from which the dbx subcommands are to be removed. See the addcmd subcommand, clear subcommand, the delete subcommand, disable subcommand, enable subcommand, the stop subcommand, the status subcommand, and the trace subcommand. The delete subcommand removes traces and stops from the application program and tskip counts for a thread.
The traces and stops to be removed can be specified through the Number parameters, or all traces and stops can be removed by using the all flag. Use the status subcommand to display the numbers associated by the dbx debug program with a trace or mahual.
The remaining tskip count, which was set using the tskip amnual for a thread, can be deleted using the tskip flag. Use the status subcommand to display the remaining thread tskip counts. If no thread is specified, the current thread is used. See the clear subcommand, the cleari subcommand, the status subcommand, the tskip subcommand, and Setting and Deleting Breakpoints in in General Programming Concepts: The detach subcommand continues the execution of the application program and exits the debug program.
A signal can be specified either by:. If a signal is specified, the program continues as if it received that signal.