Setting disassembly flavour to Intel in LLDB

16,298

Solution 1

No, not yet. Intel format disassembly is a feature I'm sure will be implemented eventually, but I don't think anyone is working on it today.

UPDATE: the ability to select the assembly style was added to the top of tree sources (v. http://lldb.llvm.org ) March 1st, 2013 with the -F or --flavor option to disassemble or the target.x86-disassembly-flavor setting in your ~/.lldbinit file. This will be available in future releases of lldb in Xcode.

Solution 2

The exact line to write in your ~/.lldbinit file is

settings set target.x86-disassembly-flavor intel

In the future, you will also be able to tweak how immediate values are displayed with the new settings: target.use-hex-immediates and target.hex-immediates-style.

Share:
16,298

Related videos on Youtube

X-Istence
Author by

X-Istence

Bert JW Regeer is a software engineer working on exciting challenges that provide him the brain food he requires. For more information about Bert please visit http://bertjwregeer.com, or take a look at his new engineering notebook located at http://funcptr.net/! Bert is the current maintainer for WebOb and an avid Python developer working on and with Pyramid. All source code/snippets of code provided by me on any StackExchange site (StackOverflow being the primary one) is available under a MIT license without attribution required.

Updated on June 24, 2022

Comments

  • X-Istence
    X-Istence about 2 years

    Is there a way to set the disassembly flavour like there is in GDB within LLDB so that it spits out Intel style assembly rather than AT&T style?

    set disassembly-flavor intel # GDB
    

    but for LLDB.

  • X-Istence
    X-Istence over 11 years
    Thanks for this reply, I do hope that it is being worked on, Intel syntax is much more readable than AT&T GAS syntax.
  • Jason Molenda
    Jason Molenda over 11 years
    yah, whichever you're familiar with is the one you prefer - the people who have always used the AT&T syntax find the Intel one hard to read. :) lldb uses the disassembler from llvm - I'm sure someone will eventually be sufficiently motivated to add Intel formatted disassembly support to llvm.