[Lldb-commits] [PATCH] Usability improvements for Intel X86 disassembly (lldb)
jmolenda at apple.com
Fri Jul 26 16:27:03 PDT 2013
I don't think any of us are using the intel mode of disassembly so it's possible lldb's output style is suboptimal.
I think the use-hex-immediates and hex-immediate-style target settings for disassembly output are fine as long as the default output isn't changing dramatically - I know different people like to customize these settings.
Looking at gdb's output, it seems like register names are lower case but things like "DWORD PTR" are upper case. This is from a slightly older version of gdb but,
0x000000010000132c <main+8>: xorps xmm0,xmm0
0x000000010000132f <main+11>: movaps XMMWORD PTR [rbp-0x20],xmm0
0x0000000100001333 <main+15>: mov QWORD PTR [rbp-0x10],0x0
0x000000010000133b <main+23>: mov DWORD PTR [rbp-0x20],edi
0x000000010000133e <main+26>: mov QWORD PTR [rbp-0x18],rsi
0x0000000100001342 <main+30>: mov DWORD PTR [rbp-0x10],0x0
0x0000000100001349 <main+37>: lea rax,[rip+0x1bbf30] # 0x1001bd280
where lldb is currently displaying
gdb[0x10000132c]: xorps XMM0, XMM0
gdb[0x10000132f]: movaps XMMWORD PTR [RBP - 32], XMM0
gdb[0x100001333]: mov QWORD PTR [RBP - 16], 0
gdb[0x10000133b]: mov DWORD PTR [RBP - 32], EDI
gdb[0x10000133e]: mov QWORD PTR [RBP - 24], RSI
gdb[0x100001342]: mov DWORD PTR [RBP - 16], 0
gdb[0x100001349]: lea RAX, QWORD PTR [RIP + 1818416] ; "console"
Are there other Intel style disassemblers that would format these as all lower-case?
On Jul 26, 2013, at 11:59 AM, Richard Mitton <richard at codersnotes.com> wrote:
> richard.mitton added you to the CC list for the revision "Usability improvements for Intel X86 disassembly (lldb)".
> This patch adds options for various usability issues when using the Intel X86 disassembler.
>> NOTE: This requires LLVM to be patched first, see dependencies
> The following changes were made to bring Intel syntax in line with AT&T:
> - immediate values can be selected to appear as either hex or decimal
> - register names and keywords lowercased to be consistent with both att syntax and sanity.
> - annotated markup is supported in the disassembly (same as att)
> - instruction alias enabled, same as att
> In addition the following new changes are implemented:
> - fixed a bug where MOV16016a would disassembly wrongly for Intel.
> - added a switch for the user to select which style of hex constants they would prefer (c/pascal/asm style)
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
More information about the lldb-commits