LLDB setting to little endian byte order in disassemble command

Question: How to set lldb setting to little endian byte order in disassemble command

My Target : armv7 (iOS 7.1.2)
lldb version : lldb-330.0.48

Already tried : settings set target.x86-disassembly-flavor intel but does not seems to work

Target is ARM (thumb) disassembly, but am having problems with the ‘disassemble’ command. It seems that
lldb is defaulting to big-endian processing, and I cannot figure out how to switch the mode to little endian.

Dumping memory at 0x193908 shows below result
0x00193908: 0e 28 01 f2 23 80 df e8 10 f0 0f 00 71 00 ce 00 0x00193918: 4c 01 a9 01 12 02 6c 02 c9 02 36 03 74 03 9f 03 0x00193928: f3 03 46 04 99 04 ec 04 4d f2 76 01 17 20 c0 f2 0x00193938: 2a 01 cd f8 90 06 79 44 0d f5 b6 60 ce f0 62 fd 0x00193948: 18 20 cd f8 90 06 0d f5 b6 60 5d f7 23 fc 01 46 0x00193958: 19 20 cd f8 90 06 0d f5 cf 60 ce f0 73 fe 0d f5 0x00193968: b6 60 ce f0
Disassemble command shows big-endian results
(lldb) disassemble -b -s 0x193908 0x193908: 0xf201280e vadd.i8 d2, d1, d14 0x19390c: 0xe8df8023 ldm pc, {r0, r1, r5, pc} ^ 0x193910: 0x000ff010 andeq pc, pc, r0, lsl r0 0x193914: 0x00ce0071 sbceq r0, lr, r1, ror r0 0x193918: 0x01a9014c .long 0x01a9014c ; unknown opcode 0x19391c: 0x026c0212 rsbeq r0, r12, #0x20000001 0x193920: 0x033602c9 teqeq r6, #0x9000000c 0x193924: 0x039f0374 orrseq r0, pc, #0xd0000001

*How to make disassemble command to little endian byte order
Thanks.

1 个赞

Hi,

ok got it. In LLDB we don’t have option for 16 bit disassembly for my version. So its not possible to get the desired output. Only option we have

x86-disassembly-flavor – The default disassembly flavor to use for x86 or x86-64 targets.
No 16 bit option

A picture is worth 1000 words.

Thanks!

1 个赞

using lldb version “lldb-350.0.21.3”, in xcode 7.3

Does it support you mean to say ?

sure!

Cool thanks Young for the confirmation appreciate it. :+1: