ArticleDirectory
- Unix (Solaris) systems generally come with DBX debugging tools. The following describes some common commands.
Unix (Solaris) systems generally come with DBX debugging tools. The following describes some common commands. 1. Run Dbx
$ DbxExecutable File Name
The executable file must be replaced -GParameters
2. DisplayCode
(DBX) List//List codes starting with a file
(DBX) ListN//ListNLine Code
(DBX) ListM, n//List slaveMLine startNLine Code
3.
RunProgram
(DBX) Run//Execute a program without Parameters
(DBX) RunArg1... Argn//Execute a program with Parameters
This command is equivalentVCShortcutF5
4. Set breakpoints
(DBX) Stop AtN//InNLine setting breakpoint
(DBX) Stop InFuncname//InFuncnameSet a breakpoint at the function entry
This command is equivalentVCShortcutF9
5. Display breakpoints that have been set
(DBX) Status
This command is equivalentVCShortcutCTRL + B
6. Delete and block breakpoints
(DBX) DeleteN//Delete a breakpoint,NIs the row number
(DBX) DisableN//Block breakpoints,NIs the row number
(DBX) EnableN//Reply to breakpoint,NIs the row number
In useStatusWhen the command displays the configured breakpoint, there is a"*"
7.
One-step execution Program
(DBX) Next
Use this command to execute the function. When the function is executed, the function details are not displayed. After you execute the function in one step, continue to execute it.
8. Enter the function body for execution
(DBX) Step
This command andNextSimilarly, when the function is executed, enter the function body to execute the function. After executing the statements in the function body, return to the resident function and continue to execute the following statements.
9. Continue from the breakpoint
(DBX) cont
This command can be used to directly execute from one breakpoint to another. You can also jump out of the loop (you can set a breakpoint inside and outside the loop) when necessary to track the number of necessary cycles, when the single loop is not over, skip the loop and continue to execute
10.
Jump statement
(DBX) GOTON// NYesrow number
Jump to the desired code, but this command cannot change the actual execution sequence of the program
11.
Show variable values
(DBX) printI// IVariable name
12.
Display the definition position of a Variable
(DBX) whereisI// IVariable name
Display format: File Name.Function Name.Variable name. For example:Test. Main. I
13.
Show variable type
(DBX) whatisI// IVariable name
14.
Search for strings in the source file
(DBX)/var//Search upVaR
(DBX )? VaR//Search downVaR
15.
In ( Dbx ) Starts and exits internally. Shell
(DBX) Sh//StartShell
Directly write at the prompt when exitingExitThen return(DBX)Prompt
16.
Use Dbx Analysis Core File
DbxExecutable File NameCoreFile Name