[flang] Fix length handling in character kind implicit conversion (#74586)
[llvm-project.git] / lldb / test / Shell / Commands / command-disassemble.s
blob10ce8354025ac5990b59d566e4d5e9568038603d
1 # REQUIRES: x86
3 # RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux %s -o %t
4 # RUN: %lldb %t -o "settings set interpreter.stop-command-source-on-error false" \
5 # RUN: -o "settings set stop-disassembly-max-size 8000" \
6 # RUN: -s %S/Inputs/command-disassemble.lldbinit -o exit 2>&1 | FileCheck %s
8 # CHECK: (lldb) disassemble
9 # CHECK-NEXT: error: Cannot disassemble around the current function without a selected frame: no currently running process.
10 # CHECK-NEXT: (lldb) disassemble --line
11 # CHECK-NEXT: error: Cannot disassemble around the current line without a selected frame: no currently running process.
12 # CHECK-NEXT: (lldb) disassemble --frame
13 # CHECK-NEXT: error: Cannot disassemble around the current function without a selected frame: no currently running process.
14 # CHECK-NEXT: (lldb) disassemble --pc
15 # CHECK-NEXT: error: Cannot disassemble around the current PC without a selected frame: no currently running process.
16 # CHECK-NEXT: (lldb) disassemble --start-address 0x0
17 # CHECK-NEXT: command-disassemble.s.tmp`foo:
18 # CHECK-NEXT: command-disassemble.s.tmp[0x0] <+0>: int $0x10
19 # CHECK-NEXT: command-disassemble.s.tmp[0x2] <+2>: int $0x11
20 # CHECK-NEXT: command-disassemble.s.tmp[0x4] <+4>: int $0x12
21 # CHECK-NEXT: command-disassemble.s.tmp[0x6] <+6>: int $0x13
22 # CHECK-NEXT: command-disassemble.s.tmp[0x8] <+8>: int $0x14
23 # CHECK-NEXT: command-disassemble.s.tmp[0xa] <+10>: int $0x15
24 # CHECK-NEXT: command-disassemble.s.tmp[0xc] <+12>: int $0x16
25 # CHECK-EMPTY:
26 # CHECK-NEXT: command-disassemble.s.tmp`bar:
27 # CHECK-NEXT: command-disassemble.s.tmp[0xe] <+0>: int $0x17
28 # CHECK-NEXT: command-disassemble.s.tmp[0x10] <+2>: int $0x18
29 # CHECK-NEXT: command-disassemble.s.tmp[0x12] <+4>: int $0x19
30 # CHECK-NEXT: command-disassemble.s.tmp[0x14] <+6>: int $0x1a
31 # CHECK-NEXT: command-disassemble.s.tmp[0x16] <+8>: int $0x1b
32 # CHECK-NEXT: command-disassemble.s.tmp[0x18] <+10>: int $0x1c
33 # CHECK-NEXT: command-disassemble.s.tmp[0x1a] <+12>: int $0x1d
34 # CHECK-NEXT: command-disassemble.s.tmp[0x1c] <+14>: int $0x1e
35 # CHECK-NEXT: command-disassemble.s.tmp[0x1e] <+16>: int $0x1f
36 # CHECK-NEXT: (lldb) disassemble --start-address 0x4 --end-address 0x8
37 # CHECK-NEXT: command-disassemble.s.tmp`foo:
38 # CHECK-NEXT: command-disassemble.s.tmp[0x4] <+4>: int $0x12
39 # CHECK-NEXT: command-disassemble.s.tmp[0x6] <+6>: int $0x13
40 # CHECK-NEXT: (lldb) disassemble --start-address 0x8 --end-address 0x4
41 # CHECK-NEXT: error: End address before start address.
42 # CHECK-NEXT: (lldb) disassemble --address 0x0
43 # CHECK-NEXT: command-disassemble.s.tmp`foo:
44 # CHECK-NEXT: command-disassemble.s.tmp[0x0] <+0>: int $0x10
45 # CHECK-NEXT: command-disassemble.s.tmp[0x2] <+2>: int $0x11
46 # CHECK-NEXT: command-disassemble.s.tmp[0x4] <+4>: int $0x12
47 # CHECK-NEXT: command-disassemble.s.tmp[0x6] <+6>: int $0x13
48 # CHECK-NEXT: command-disassemble.s.tmp[0x8] <+8>: int $0x14
49 # CHECK-NEXT: command-disassemble.s.tmp[0xa] <+10>: int $0x15
50 # CHECK-NEXT: command-disassemble.s.tmp[0xc] <+12>: int $0x16
51 # CHECK-NEXT: (lldb) disassemble --address 0xdeadb
52 # CHECK-NEXT: error: Could not find function bounds for address 0xdeadb
53 # CHECK-NEXT: (lldb) disassemble --address 0x100
54 # CHECK-NEXT: error: Not disassembling the function because it is very large [0x0000000000000040-0x0000000000002040). To disassemble specify an instruction count limit, start/stop addresses or use the --force option.
55 # CHECK-NEXT: (lldb) disassemble --address 0x100 --count 3
56 # CHECK-NEXT: command-disassemble.s.tmp`very_long:
57 # CHECK-NEXT: command-disassemble.s.tmp[0x40] <+0>: int $0x2a
58 # CHECK-NEXT: command-disassemble.s.tmp[0x42] <+2>: int $0x2a
59 # CHECK-NEXT: command-disassemble.s.tmp[0x44] <+4>: int $0x2a
60 # CHECK-NEXT: (lldb) disassemble --address 0x100 --force
61 # CHECK-NEXT: command-disassemble.s.tmp`very_long:
62 # CHECK-NEXT: command-disassemble.s.tmp[0x40] <+0>: int $0x2a
63 # CHECK: command-disassemble.s.tmp[0x203e] <+8190>: int $0x2a
64 # CHECK-NEXT: (lldb) disassemble --start-address 0x0 --count 7
65 # CHECK-NEXT: command-disassemble.s.tmp`foo:
66 # CHECK-NEXT: command-disassemble.s.tmp[0x0] <+0>: int $0x10
67 # CHECK-NEXT: command-disassemble.s.tmp[0x2] <+2>: int $0x11
68 # CHECK-NEXT: command-disassemble.s.tmp[0x4] <+4>: int $0x12
69 # CHECK-NEXT: command-disassemble.s.tmp[0x6] <+6>: int $0x13
70 # CHECK-NEXT: command-disassemble.s.tmp[0x8] <+8>: int $0x14
71 # CHECK-NEXT: command-disassemble.s.tmp[0xa] <+10>: int $0x15
72 # CHECK-NEXT: command-disassemble.s.tmp[0xc] <+12>: int $0x16
73 # CHECK-NEXT: (lldb) disassemble --start-address 0x0 --end-address 0x20 --count 7
74 # CHECK-NEXT: error: invalid combination of options for the given command
75 # CHECK-NEXT: (lldb) disassemble --name case1
76 # CHECK-NEXT: command-disassemble.s.tmp`n1::case1:
77 # CHECK-NEXT: command-disassemble.s.tmp[0x2040] <+0>: int $0x30
78 # CHECK-EMPTY:
79 # CHECK-NEXT: command-disassemble.s.tmp`n2::case1:
80 # CHECK-NEXT: command-disassemble.s.tmp[0x2042] <+0>: int $0x31
81 # CHECK-EMPTY:
82 # CHECK-NEXT: (lldb) disassemble --name case2
83 # CHECK-NEXT: command-disassemble.s.tmp`n1::case2:
84 # CHECK-NEXT: command-disassemble.s.tmp[0x2044] <+0>: int $0x32
85 # CHECK-NEXT: warning: Not disassembling a range because it is very large [0x0000000000002046-0x0000000000004046). To disassemble specify an instruction count limit, start/stop addresses or use the --force option.
86 # CHECK-NEXT: (lldb) disassemble --name case3
87 # CHECK-NEXT: error: Not disassembling a range because it is very large [0x0000000000004046-0x0000000000006046). To disassemble specify an instruction count limit, start/stop addresses or use the --force option.
88 # CHECK-NEXT: Not disassembling a range because it is very large [0x0000000000006046-0x0000000000008046). To disassemble specify an instruction count limit, start/stop addresses or use the --force option.
89 # CHECK-NEXT: (lldb) disassemble --name case3 --count 3
90 # CHECK-NEXT: command-disassemble.s.tmp`n1::case3:
91 # CHECK-NEXT: command-disassemble.s.tmp[0x4046] <+0>: int $0x2a
92 # CHECK-NEXT: command-disassemble.s.tmp[0x4048] <+2>: int $0x2a
93 # CHECK-NEXT: command-disassemble.s.tmp[0x404a] <+4>: int $0x2a
94 # CHECK-EMPTY:
95 # CHECK-NEXT: command-disassemble.s.tmp`n2::case3:
96 # CHECK-NEXT: command-disassemble.s.tmp[0x6046] <+0>: int $0x2a
97 # CHECK-NEXT: command-disassemble.s.tmp[0x6048] <+2>: int $0x2a
98 # CHECK-NEXT: command-disassemble.s.tmp[0x604a] <+4>: int $0x2a
99 # CHECK-EMPTY:
102 .text
103 foo:
104 int $0x10
105 int $0x11
106 int $0x12
107 int $0x13
108 int $0x14
109 int $0x15
110 int $0x16
111 bar:
112 int $0x17
113 int $0x18
114 int $0x19
115 int $0x1a
116 int $0x1b
117 int $0x1c
118 int $0x1d
119 int $0x1e
120 int $0x1f
121 int $0x20
122 int $0x21
123 int $0x22
124 int $0x23
125 int $0x24
126 int $0x25
127 int $0x26
128 int $0x27
129 int $0x28
130 int $0x29
131 int $0x2a
132 int $0x2b
133 int $0x2c
134 int $0x2d
135 int $0x2e
136 int $0x2f
138 very_long:
139 .rept 0x1000
140 int $42
141 .endr
143 _ZN2n15case1Ev:
144 int $0x30
146 _ZN2n25case1Ev:
147 int $0x31
149 _ZN2n15case2Ev:
150 int $0x32
152 _ZN2n25case2Ev:
153 .rept 0x1000
154 int $42
155 .endr
157 _ZN2n15case3Ev:
158 .rept 0x1000
159 int $42
160 .endr
162 _ZN2n25case3Ev:
163 .rept 0x1000
164 int $42
165 .endr