Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting disassembly flavour to Intel in LLDB

Tags:

gdb

llvm

lldb

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.

like image 709
X-Istence Avatar asked Mar 22 '12 19:03

X-Istence


2 Answers

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.

like image 193
0xced Avatar answered Dec 09 '22 14:12

0xced


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.

like image 37
Jason Molenda Avatar answered Dec 09 '22 15:12

Jason Molenda