[GDB] Set GDB disassembly syntax for Intel

Source: Internet
Author: User

Set GDB disassembly syntax for Intel

The "Set dis Intel", which is popular in various Linux books, is no longer applicable, and the following error occurs:

Ambiguous set command "Dis Intel": Disable-randomization, Disassemble-next-line, Disassembly-flavor, Disconnected-tracing ...

The correct command is:

sudo echo "set Disassembly-flavor Intel" > ~/.gdbinit

GDB will search for the. gdbinit file in a certain path order (usually the current directory and then the user directory) when it is started, and will automatically execute the command if it is found. This feature allows the user to put some frequently used commands in this file, so that they do not have to manually execute the commands each time they enter GDB. In fact,. Gdbinit is a script that can even define a number of commonly used GDB command sequences as a new command, so as long as the new command is entered in GDB, the command sequence defined is automatically executed.

In addition, if the user is already in gdb, then go to modify. Gdbinit, as long as through:

(gdb) Source  ~/.gdbinit

will allow those new additions to take effect.

[GDB] Set GDB disassembly syntax for Intel

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.