xref: /llvm-project/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/interactive_crashlog_json.test (revision d09231a422f052d6f6f44913fad610728a7c266b)
1# REQUIRES: python, native && system-darwin
2
3# RUN: mkdir -p %t.dir
4# RUN: yaml2obj %S/Inputs/interactive_crashlog/multithread-test.yaml > %t.dir/multithread-test
5# RUN: %lldb -o 'command script import lldb.macosx.crashlog' \
6# RUN: -o 'crashlog -a -i -t %t.dir/multithread-test %S/Inputs/interactive_crashlog/multithread-test.ips' \
7# RUN: -o "thread list" -o "bt all" 2>&1 | FileCheck %s
8
9# CHECK: "crashlog" {{.*}} commands have been installed, use the "--help" options on these commands
10
11# CHECK: (lldb) process status
12# CHECK-NEXT: Process 22511 stopped
13# CHECK-NEXT: * thread #3, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
14# CHECK-NEXT:     frame #0: 0x0000000100ec58f4 multithread-test`bar
15
16# CHECK: (lldb) thread backtrace
17# CHECK-NEXT: * thread #3, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
18# CHECK-NEXT:   * frame #0: 0x0000000100ec58f4 multithread-test`bar{{.*}} [artificial]
19# CHECK-NEXT:     frame #1: 0x0000000100ec591b multithread-test`foo{{.*}} [artificial]
20# CHECK-NEXT:     frame #2: 0x0000000100ec5a87 multithread-test`compute_pow{{.*}} [artificial]
21
22# CHECK: (lldb) thread list
23# CHECK-NEXT: Process 22511 stopped
24# CHECK-NEXT:   thread #1: tid = 0x23c7fe, 0x000000019cc40b84{{.*}}, queue = 'com.apple.main-thread'
25# CHECK-NEXT:   thread #2: tid = 0x23c800, 0x000000019cc42c9c{{.*}}
26# CHECK-NEXT: * thread #3: tid = 0x23c801, 0x0000000100ec58f4 multithread-test`bar{{.*}}, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
27
28# CHECK: (lldb) bt all
29# CHECK:  thread #1, queue = 'com.apple.main-thread'
30# CHECK:    frame #{{[0-9]+}}: 0x000000019cc40b84{{.*}} [artificial]
31# CHECK:    frame #{{[0-9]+}}: 0x0000000100ec5b3b multithread-test`main{{.*}} [artificial]
32# CHECK:    frame #{{[0-9]+}}: 0x00000002230f8da7{{.*}} [artificial]
33# CHECK-NEXT:  thread #2
34# CHECK-NEXT:    frame #0: 0x000000019cc42c9c{{.*}} [artificial]
35# CHECK:    frame #{{[0-9]+}}: 0x0000000100ec5957 multithread-test`call_and_wait{{.*}} [artificial]
36# CHECK:    frame #{{[0-9]+}}: 0x000000019cc7e06b{{.*}} [artificial]
37# CHECK:    frame #{{[0-9]+}}: 0x000000019cc78e2b{{.*}} [artificial]
38# CHECK-NEXT:* thread #3, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
39# CHECK-NEXT:  * frame #0: 0x0000000100ec58f4 multithread-test`bar{{.*}} [artificial]
40# CHECK-NEXT:    frame #1: 0x0000000100ec591b multithread-test`foo{{.*}} [artificial]
41# CHECK-NEXT:    frame #2: 0x0000000100ec5a87 multithread-test`compute_pow{{.*}} [artificial]
42# CHECK:    frame #{{[0-9]+}}: 0x000000019cc7e06b{{.*}} [artificial]
43# CHECK:    frame #{{[0-9]+}}: 0x000000019cc78e2b{{.*}} [artificial]
44