1

I want to know whether I can change the syntax of the output of the following command:

x/5i $rip

Now it gives output like that. I guess it is AT&T syntax, correct my if I'm wrong (newbie):

->  0x100000f96: bf 01 00 00 00  movl   $0x1, %edi
    0x100000f9b: be 02 00 00 00  movl   $0x2, %esi
    0x100000fa0: ba 03 00 00 00  movl   $0x3, %edx
    0x100000fa5: b9 04 00 00 00  movl   $0x4, %ecx
    0x100000faa: e8 b1 ff ff ff  callq  0x100000f60               ; test_func at main.c:4

What I want is to something like -F flag in the following command disassemble -n main -F intel. Is there any way to achieve that. I have not found anything neither using help x nor by googling. Thanks in advance!

Note: I am using lldb as a debugger.

1
  • 1
    No idea about lldb but in gdb you can set disassembly-flavor intel Commented Aug 4, 2020 at 16:44

1 Answer 1

3

Thanks to Jester for a clue. I have found the solution here.

settings set target.x86-disassembly-flavor intel

This will work for x command as well.

Sign up to request clarification or add additional context in comments.

1 Comment

If you put this^ in ~/.lldbinit it will automatically happen on every launch of lldb.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.