3 # RUN: yaml2obj --docnum=1 -DMAIN_SIZE=8 %s -o %T/command-disassemble-process.exe
4 # RUN: yaml2obj --docnum=1 -DMAIN_SIZE=8000 %s -o %T/command-disassemble-process.big.exe
5 # RUN: yaml2obj --docnum=2 %s -o %t
7 # RUN: %lldb -c %t %T/command-disassemble-process.exe \
8 # RUN: -o "settings set interpreter.stop-command-source-on-error false" \
9 # RUN: -s %S/Inputs/command-disassemble-process.lldbinit -o exit \
12 # RUN: %lldb -c %t %T/command-disassemble-process.big.exe \
13 # RUN: -o "settings set stop-disassembly-max-size 8000" \
14 # RUN: -o disassemble -o exit 2>&1 | FileCheck %s --check-prefix=BIG
16 # RUN: %lldb -c %t %T/command-disassemble-process.exe \
17 # RUN: -o "settings set interpreter.stop-command-source-on-error false" \
18 # RUN: -o "disassemble --address 0xdead" -o exit 2>&1 \
19 # RUN: | FileCheck %s --check-prefix=INVALID
21 # CHECK: (lldb) disassemble
22 # CHECK-NEXT: command-disassemble-process.exe`main:
23 # CHECK-NEXT: 0x4002 <+0>: addb %al, (%rcx)
24 # CHECK-NEXT: -> 0x4004 <+2>: addb %al, (%rdx)
25 # CHECK-NEXT: 0x4006 <+4>: addb %al, (%rbx)
26 # CHECK-NEXT: 0x4008 <+6>: addb %al, (%rsi)
27 # CHECK-NEXT: (lldb) disassemble --line
28 # CHECK-NEXT: command-disassemble-process.exe`main:
29 # CHECK-NEXT: -> 0x4004 <+2>: addb %al, (%rdx)
30 # CHECK-NEXT: 0x4006 <+4>: addb %al, (%rbx)
31 # CHECK-NEXT: 0x4008 <+6>: addb %al, (%rsi)
32 # CHECK-NEXT: 0x400a: addb %al, (%rdi)
33 # CHECK-NEXT: (lldb) disassemble --frame
34 # CHECK-NEXT: command-disassemble-process.exe`main:
35 # CHECK-NEXT: 0x4002 <+0>: addb %al, (%rcx)
36 # CHECK-NEXT: -> 0x4004 <+2>: addb %al, (%rdx)
37 # CHECK-NEXT: 0x4006 <+4>: addb %al, (%rbx)
38 # CHECK-NEXT: 0x4008 <+6>: addb %al, (%rsi)
39 # CHECK-NEXT: (lldb) disassemble --pc
40 # CHECK-NEXT: command-disassemble-process.exe`main:
41 # CHECK-NEXT: -> 0x4004 <+2>: addb %al, (%rdx)
42 # CHECK-NEXT: 0x4006 <+4>: addb %al, (%rbx)
43 # CHECK-NEXT: 0x4008 <+6>: addb %al, (%rsi)
44 # CHECK-NEXT: 0x400a: addb %al, (%rdi)
45 # CHECK-NEXT: (lldb) disassemble --address 0x4004
46 # CHECK-NEXT: command-disassemble-process.exe`main:
47 # CHECK-NEXT: 0x4002 <+0>: addb %al, (%rcx)
48 # CHECK-NEXT: -> 0x4004 <+2>: addb %al, (%rdx)
49 # CHECK-NEXT: 0x4006 <+4>: addb %al, (%rbx)
50 # CHECK-NEXT: 0x4008 <+6>: addb %al, (%rsi)
51 # CHECK-NEXT: (lldb) disassemble --count 7
52 # CHECK-NEXT: command-disassemble-process.exe`main:
53 # CHECK-NEXT: 0x4002 <+0>: addb %al, (%rcx)
54 # CHECK-NEXT: -> 0x4004 <+2>: addb %al, (%rdx)
55 # CHECK-NEXT: 0x4006 <+4>: addb %al, (%rbx)
56 # CHECK-NEXT: 0x4008 <+6>: addb %al, (%rsi)
57 # CHECK-NEXT: 0x400a: addb %al, (%rdi)
58 # CHECK-NEXT: 0x400c: addb %cl, (%rax)
59 # CHECK-NEXT: 0x400e: addb %cl, (%rcx)
60 # CHECK-NEXT: (lldb) disassemble --pc --count 7
61 # CHECK-NEXT: command-disassemble-process.exe`main:
62 # CHECK-NEXT: -> 0x4004 <+2>: addb %al, (%rdx)
63 # CHECK-NEXT: 0x4006 <+4>: addb %al, (%rbx)
64 # CHECK-NEXT: 0x4008 <+6>: addb %al, (%rsi)
65 # CHECK-NEXT: 0x400a: addb %al, (%rdi)
66 # CHECK-NEXT: 0x400c: addb %cl, (%rax)
67 # CHECK-NEXT: 0x400e: addb %cl, (%rcx)
68 # CHECK-NEXT: 0x4010: addb %cl, (%rdx)
70 # INVALID: error: Could not find function bounds for address 0xdead
72 # BIG: error: Not disassembling the current function because it is very large [0x0000000000004002-0x0000000000005f42). To disassemble specify an instruction count limit, start/stop addresses or use the --force option.
83 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
84 Address: 0x0000000000004000
85 AddressAlign: 0x0000000000001000
86 Content: 00000001000200030006000700080009000A000B000E000F00100011001200130016001700180019001A001B001E001F00200021002200230026002700280029002A002B002E002F
88 - Name: .note.gnu.build-id
91 Address: 0x0000000000005000
92 AddressAlign: 0x0000000000001000
93 Content: 040000000800000003000000474E5500DEADBEEFBAADF00D
98 Value: 0x0000000000004002
102 Flags: [ PF_X, PF_R ]
108 Flags: [ PF_W, PF_R ]
111 FirstSec: .note.gnu.build-id
112 LastSec: .note.gnu.build-id
119 - Base of Image: 0x0000000000004000
120 Size of Image: 0x00002000
121 Module Name: 'command-disassemble-process.yaml'
122 CodeView Record: 4C457042DEADBEEFBAADF00D
125 Processor Arch: AMD64
128 Vendor ID: GenuineIntel
129 Version Info: 0x00000000
130 Feature Info: 0x00000000
133 - Thread Id: 0x000074F3
134 Context: 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000B001000000000006CAE000000006B7FC05A0000C81D415A0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000A2BF9E5A6B7F0000000000000000000000000000000000008850C14BFD7F00009850C14BFD7F00000100000000000000B04AC14BFD7F0000000000000000000060812D01000000000800000000000000B065E05A6B7F00008004400000000000E050C14BFD7F00000000000000000000000000000000000004400000000000007F03FFFF0000FFFFFFFFFFFF000000000000000000000000801F00006B7F00000400000000000000B84CC14BFD7F0000304D405A6B7F0000C84DC14BFD7F0000C0AA405A6B7F00004F033D0000000000B84DC14BFD7F0000E84DC14BFD7F0000000000000000000000000000000000000070E05A6B7F000078629E5A6B7F0000C81D415A6B7F0000804F9E5A6B7F00000000000001000000E603000001000000E093115A6B7F0000804EC14BFD7F0000584EC14BFD7F000099ADC05A6B7F00000100000000000000AAAAD77D0000000002000000000000000800000000000000B065E05A6B7F0000E6B7C05A6B7F0000010000006B7F0000884DC14BFD7F0000106F7C5A6B7F0000984EC14BFD7F0000488B7C5A6B7F0000C4A71CB90000000001000000000000000800000000000000B065E05A6B7F000048B6C05A6B7F0000702AE25A6B7F0000D84DC14BFD7F000030489E5A6B7F0000E84EC14BFD7F0000E05E9E5A6B7F00000991F0460000000001000000000000000800000000000000B065E05A6B7F000048B6C05A6B7F00000100000000000000284EC14BFD7F00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
136 Start of Memory Range: 0x00007FFD4BC15080
137 Content: 30044000000000000000000000000000
140 - Start of Memory Range: 0x00007FFD4BC15080
141 Content: 30044000000000000000000000000000