Setting disassembly flavour to Intel in LLDB

2019-03-09 02:08发布

问题:

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.

回答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.



回答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.



标签: gdb llvm lldb