GDB Peda Common directives

Source: Internet
Author: User

Original Author: ADMIN

Transferred from: http://blog.ikow.cn/gdb-peda-common-command/

Info

View various information:

Info file to view information about the current file, such as the program entry point (Entry points)

Info Break View current Breakpoint information

Disassemble+func Disassembly of the established functions

Break + Address set breakpoints

R is equivalent to "run" running the program

c is equivalent to "continue", continue execution

x/

N, F, and u are optional parameters.

n is a positive integer that represents the number of memory units that need to be displayed, that is, the contents of several memory units are displayed backwards from the current address, and the size of a memory unit is defined by the following U.

F represents the format shown, see below. If the address refers to a string, then the format can be S, if the address is an instruction address, then the format can be I.

U represents the number of bytes requested from the current address, and if not specified, gdb defaults to 4 bytes. The u parameter can be substituted with the following character, b for single byte, h for Double Byte, W for four bytes, and G for eight bytes. When we specify the byte length, GDB starts by referring to the memory address, reads and writes the specified byte, and takes it as a value.

Represents a memory address.

Note: The relationship between N and U is strictly distinguished, N represents the number of units, and U represents the size of each cell.

layout: Used to split the window, you can view the code while testing. There are several ways to use the main:

Layout src: Display source code window

Layout ASM: Display Assembly window

Layout regs: Display source code/assembly and Register window

Layout split: Display source Code and assembly window

Layout Next: Show Next layout

Layout prev: Show Previous layout

Ctrl + L: Refresh window

Ctrl + x, then press 1: Single-window mode, display a window

Ctrl + x, press 2: Double-window mode, display two windows

Ctrl + x, then press a: Back to the traditional mode, exit layout and go back to the debug window before the layout is executed.

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.