30

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
  • 16,324
  • 6
  • 57
  • 74

2 Answers2

61

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.

0xced
  • 25,219
  • 10
  • 103
  • 255
19

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.

Jason Molenda
  • 14,835
  • 1
  • 59
  • 61
  • 3
    Thanks for this reply, I do hope that it is being worked on, Intel syntax is much more readable than AT&T GAS syntax. – X-Istence Oct 07 '12 at 18:50
  • 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. – Jason Molenda Oct 08 '12 at 09:36
  • I know this is late, but I just got ino lldb debugging a few days ago. I normally see Intel syntax and am happy with that, but just now I used a GDB command (x -s8 -fx -c4 0x0000000100004024) and that command was understood by LLDB to mean I preferred AT&T syntax. so is there a command I can type into an LLDB session to revert syntax? I just did a couple of step commands and Intel is back. So, n-e-v-e-r m-i-n-d. – RadlyEel Sep 04 '22 at 23:46