annotate lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-win.test @ 227:21e6aa2e49ef

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 19 Jul 2021 06:57:16 +0900
parents 2e18cbf3894f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 # REQUIRES: x86
anatofuz
parents:
diff changeset
2
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
3 # RUN: yaml2obj %S/Inputs/unwind-via-stack-win.yaml -o %t
150
anatofuz
parents:
diff changeset
4 # RUN: %lldb -c %t \
anatofuz
parents:
diff changeset
5 # RUN: -o "target symbols add %S/Inputs/unwind-via-stack-win.syms" \
anatofuz
parents:
diff changeset
6 # RUN: -s %s -b | FileCheck %s
anatofuz
parents:
diff changeset
7
anatofuz
parents:
diff changeset
8 # First check that unwind plan generation works correctly.
anatofuz
parents:
diff changeset
9 # This function has a "typical" unwind rule.
anatofuz
parents:
diff changeset
10 image show-unwind -n call_many
anatofuz
parents:
diff changeset
11 # CHECK-LABEL: image show-unwind -n call_many
anatofuz
parents:
diff changeset
12 # CHECK: UNWIND PLANS for unwind-via-stack-win.exe`call_many
anatofuz
parents:
diff changeset
13 # CHECK: Symbol file UnwindPlan:
anatofuz
parents:
diff changeset
14 # CHECK: This UnwindPlan originally sourced from breakpad STACK WIN
anatofuz
parents:
diff changeset
15 # CHECK: This UnwindPlan is sourced from the compiler: yes.
anatofuz
parents:
diff changeset
16 # CHECK: This UnwindPlan is valid at all instruction locations: no.
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
17 # CHECK: This UnwindPlan is for a trap handler function: no.
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
18 # CHECK: Address range of this UnwindPlan: [unwind-via-stack-win.exe..module_image + 4112-0x0000107d)
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
19 # CHECK: row[0]: 0: CFA=DW_OP_breg7 +0, DW_OP_consts +80, DW_OP_plus => esp=DW_OP_pick 0x0, DW_OP_consts +4, DW_OP_plus eip=DW_OP_pick 0x0, DW_OP_deref
150
anatofuz
parents:
diff changeset
20
anatofuz
parents:
diff changeset
21 # Then, some invalid rules.
anatofuz
parents:
diff changeset
22 image show-unwind -n bogus_rule
anatofuz
parents:
diff changeset
23 # CHECK-LABEL: image show-unwind -n bogus_rule
anatofuz
parents:
diff changeset
24 # CHECK: UNWIND PLANS for unwind-via-stack-win.exe`bogus_rule
anatofuz
parents:
diff changeset
25 # CHECK-NOT: Symbol file
anatofuz
parents:
diff changeset
26
anatofuz
parents:
diff changeset
27 image show-unwind -n bogus_cfa_rhs
anatofuz
parents:
diff changeset
28 # CHECK-LABEL: image show-unwind -n bogus_cfa_rhs
anatofuz
parents:
diff changeset
29 # CHECK: UNWIND PLANS for unwind-via-stack-win.exe`bogus_cfa_rhs
anatofuz
parents:
diff changeset
30 # CHECK-NOT: Symbol file
anatofuz
parents:
diff changeset
31
anatofuz
parents:
diff changeset
32 image show-unwind -n bogus_esp_rhs
anatofuz
parents:
diff changeset
33 # CHECK-LABEL: image show-unwind -n bogus_esp_rhs
anatofuz
parents:
diff changeset
34 # CHECK: UNWIND PLANS for unwind-via-stack-win.exe`bogus_esp_rhs
anatofuz
parents:
diff changeset
35 # CHECK-NOT: Symbol file
anatofuz
parents:
diff changeset
36
anatofuz
parents:
diff changeset
37 # We don't treat unknown lhs as an error, as it can be just a temporary
anatofuz
parents:
diff changeset
38 # variable used in other rules.
anatofuz
parents:
diff changeset
39 image show-unwind -n temporary_var
anatofuz
parents:
diff changeset
40 # CHECK-LABEL: image show-unwind -n temporary_var
anatofuz
parents:
diff changeset
41 # CHECK: UNWIND PLANS for unwind-via-stack-win.exe`temporary_var
anatofuz
parents:
diff changeset
42 # CHECK: Symbol file UnwindPlan:
anatofuz
parents:
diff changeset
43 # CHECK: This UnwindPlan originally sourced from breakpad STACK WIN
anatofuz
parents:
diff changeset
44 # CHECK: This UnwindPlan is sourced from the compiler: yes.
anatofuz
parents:
diff changeset
45 # CHECK: This UnwindPlan is valid at all instruction locations: no.
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
46 # CHECK: This UnwindPlan is for a trap handler function: no.
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
47 # CHECK: Address range of this UnwindPlan: [unwind-via-stack-win.exe..module_image + 4400-0x00001134)
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
48 # CHECK: row[0]: 0: CFA=DW_OP_breg7 +0 => esp=DW_OP_pick 0x0, DW_OP_consts +4, DW_OP_plus eip=DW_OP_pick 0x0, DW_OP_deref
150
anatofuz
parents:
diff changeset
49
anatofuz
parents:
diff changeset
50 # And finally, check that backtracing works as a whole by unwinding a simple
anatofuz
parents:
diff changeset
51 # stack.
anatofuz
parents:
diff changeset
52 thread backtrace
anatofuz
parents:
diff changeset
53 # CHECK-LABEL: thread backtrace
anatofuz
parents:
diff changeset
54 # CHECK: frame #0: 0x000b1092 unwind-via-stack-win.exe`many_pointer_args
anatofuz
parents:
diff changeset
55 # CHECK: frame #1: 0x000b1079 unwind-via-stack-win.exe`call_many + 105
anatofuz
parents:
diff changeset
56 # CHECK: frame #2: 0x000b1085 unwind-via-stack-win.exe`main + 5
anatofuz
parents:
diff changeset
57 # CHECK: frame #3: 0x77278494 kernel32.dll
anatofuz
parents:
diff changeset
58 # CHECK-NOT: frame