[Lldb-commits] [PATCH] Usability improvements for Intel X86 disassembly (lldb)

Richard Mitton richard at codersnotes.com
Fri Jul 26 16:35:36 PDT 2013


I set the defaults as 'hex-by-default' and C-style, so it should be fine 
for most people.

As for lower case pointers, it's mostly just a matter of style I think. 
I don't see any reason to special case it compared to everything else. 
Visual Studio uses lower case too.

Richard Mitton
richard at codersnotes.com

On 07/26/2013 04:27 PM, Jason Molenda wrote:
> 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)
>>
>>
>> http://llvm-reviews.chandlerc.com/D1222
>>
>> Files:
>>   include/lldb/Core/Disassembler.h
>>   include/lldb/Target/Target.h
>>   source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
>>   source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h
>>   source/Target/Target.cpp
>> <D1222.1.patch>_______________________________________________
>> lldb-commits mailing list
>> lldb-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits




More information about the lldb-commits mailing list