Linux Debugger-GDB Commands detailed __linux

Source: Internet
Author: User

gdb Command Detailed

Awatch

Specifies a variable, if the variable is read or written, suspends the program, displays the information in the debugger, and waits for the next debug command. Refer to Rwatch and watch commands.

BackTrace

To display the trace of all stack frames (stack frames) and the value of the parameters of the current function called by the function, BT is the shorthand for this command.

Break

Set a breakpoint that specifies the line of code or function name as an argument

Clear

To delete a breakpoint, this command needs to develop a line of code or function name as an argument

Continue

Where the debugger stops, continue execution

Ctrl-c

Stops execution of executing program at current position, breakpoint on current line

Disable

Disable breakpoint feature, this command requires a forbidden breakpoint in the breakpoint list index value as parameter

Display

Displays the value of the specified expression where the breakpoint is stopped. (Show variables)

Enable

Allow breakpoint function, this command needs to allow breakpoints in breakpoint list index value as parameter

Finish

Continue execution, knowing that the current function returns

Ignore

Ignores the number of times a breakpoint has been set. Example: Ignore 4 23 ignores Breakpoint 4 's 23 run and interrupts at 24th time

Info Breakpoints

View breakpoint Information

Info display

View information about the expression that you want to display for your settings

Kill

Terminate the process of the current debug

List

Displays 10 lines of code. If no arguments are supplied to this command, 10 lines of code are displayed starting at the current line.
If the function name is provided as an argument, it is displayed from the beginning of the function. If the number of the line of code is supplied as a parameter
Number, this line is displayed as the beginning.

Load

Dynamically loads an executable file into the debugger.

Next

Executes all the instructions for the next line of source code. If it is a function call, it is also used as a line of source code to return to this function

Nexti

Executes an assembly instruction in the source code of the next line

Print

Display the value of a variable

PType

Display the type of a variable

Return

Force to return from the current function

Run

Execute from where the program started

Rwatch

Specifies a variable, if the variable is read, suspends the program, displays the information in the debugger, and waits for the next debug command. Refer to Rwatch and watch commands.

Set

Sets the value of a variable. For example: Set nval=54 will save 54 to the Nval variable

Step

Continue to execute all instructions for the next line of source code in the program. If you call a function, the command goes inside the function, stepping through the code in the function.

Stepi

Continue to execute the assembly instruction in the next line of the program's source code. If it is a function call, the command will go inside the function and step through the assembly code in the function.

Txbreak

Set a temporary breakpoint on the exit point of the current function (only once).

Undisplay

Deletes a variable display setting of display. This command requires an index in the display list to be an argument.

Watch

Specifies a variable, and if the variable is written, suspends the program, displays the information in the debugger, and waits for the next debug command. Refer to Rwatch and watch commands.

Whatis

Displays the value and type of the variable.

Xbreak

Sets a breakpoint on the point at which the current function exits.

Insert Segment AD

Linux Culture T-shirts, Taobao sales, interested in can buy.

Taobao Store Address:

Http://auction1.taobao.com/auction/item_detail-0db2-5ba9dd77b24e43b427e1d71d7b19a0d2.jhtml

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.