diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-10-09 19:22:02 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-10-09 19:22:02 +0000 |
commit | 87aa9c9e4d41ed881453e2fab85b3d25f648bb55 (patch) | |
tree | 63efe79832bf3de4f63e4e81c62e73923947b882 /lldb/test/Shell/SymbolFile/Breakpad | |
parent | fd18e94697c987d5f24e25aa4e27adaffff3cce4 (diff) | |
download | bcm5719-llvm-87aa9c9e4d41ed881453e2fab85b3d25f648bb55.tar.gz bcm5719-llvm-87aa9c9e4d41ed881453e2fab85b3d25f648bb55.zip |
Re-land "[test] Split LLDB tests into API, Shell & Unit"
The original patch got reverted because it broke `check-lldb` on a clean
build. This fixes that.
llvm-svn: 374201
Diffstat (limited to 'lldb/test/Shell/SymbolFile/Breakpad')
27 files changed, 636 insertions, 0 deletions
diff --git a/lldb/test/Shell/SymbolFile/Breakpad/Inputs/basic-elf.yaml b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/basic-elf.yaml new file mode 100644 index 00000000000..905dc25c3a6 --- /dev/null +++ b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/basic-elf.yaml @@ -0,0 +1,33 @@ +# A very basic ELF file to serve as a recipient of breakpad info + +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_EXEC + Machine: EM_X86_64 + Entry: 0x0000000000400000 +Sections: + - Name: .text1 + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC, SHF_EXECINSTR ] + Address: 0x0000000000400000 + AddressAlign: 0x0000000000001000 + Size: 0xb0 + - Name: .text2 + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC, SHF_EXECINSTR ] + Address: 0x00000000004000B0 + AddressAlign: 0x0000000000000010 + Size: 0x42 +Symbols: +DynamicSymbols: +ProgramHeaders: + - Type: PT_LOAD + Flags: [ PF_X, PF_R ] + VAddr: 0x400000 + Align: 0x1000 + Sections: + - Section: .text1 + - Section: .text2 +... diff --git a/lldb/test/Shell/SymbolFile/Breakpad/Inputs/basic-macho.yaml b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/basic-macho.yaml new file mode 100644 index 00000000000..9a4505c204d --- /dev/null +++ b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/basic-macho.yaml @@ -0,0 +1,50 @@ +--- !mach-o +FileHeader: + magic: 0xFEEDFACF + cputype: 0x01000007 + cpusubtype: 0x00000003 + filetype: 0x00000002 + ncmds: 9 + sizeofcmds: 520 + flags: 0x00000085 + reserved: 0x00000000 +LoadCommands: + - cmd: LC_SEGMENT_64 + cmdsize: 72 + segname: __PAGEZERO + vmaddr: 0 + vmsize: 4294967296 + fileoff: 0 + filesize: 0 + maxprot: 0 + initprot: 0 + nsects: 0 + flags: 0 + - cmd: LC_SEGMENT_64 + cmdsize: 152 + segname: __TEXT + vmaddr: 4294967296 + vmsize: 4096 + fileoff: 0 + filesize: 4096 + maxprot: 7 + initprot: 5 + nsects: 1 + flags: 0 + Sections: + - sectname: __text + segname: __TEXT + addr: 0x0000000100000FF0 + size: 6 + offset: 0x00000FF0 + align: 4 + reloff: 0x00000000 + nreloc: 0 + flags: 0x80000400 + reserved1: 0x00000000 + reserved2: 0x00000000 + reserved3: 0x00000000 + - cmd: LC_UUID + cmdsize: 24 + uuid: B3051760-22B1-7D7B-39F9-240E077D625B +... diff --git a/lldb/test/Shell/SymbolFile/Breakpad/Inputs/line-table-discontinuous-file-ids.syms b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/line-table-discontinuous-file-ids.syms new file mode 100644 index 00000000000..f19d5374056 --- /dev/null +++ b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/line-table-discontinuous-file-ids.syms @@ -0,0 +1,8 @@ +MODULE Linux x86_64 761550E08086333960A9074A9CE2895C0 a.out +INFO CODE_ID E05015768680393360A9074A9CE2895C +FILE 1 /tmp/a.c +FILE 3 /tmp/c.c +FUNC b0 10 0 func +b0 1 1 1 +b1 1 2 1 +b2 1 2 3 diff --git a/lldb/test/Shell/SymbolFile/Breakpad/Inputs/line-table-edgecases.syms b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/line-table-edgecases.syms new file mode 100644 index 00000000000..069b79cc57d --- /dev/null +++ b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/line-table-edgecases.syms @@ -0,0 +1,7 @@ +MODULE Linux x86_64 761550E08086333960A9074A9CE2895C0 a.out +INFO CODE_ID E05015768680393360A9074A9CE2895C +FILE 0 /tmp/a.c +a0 1 1 0 +FUNC b0 10 0 func +FUNC c0 10 0 func2 +c0 2 2 0 diff --git a/lldb/test/Shell/SymbolFile/Breakpad/Inputs/line-table-missing-file.syms b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/line-table-missing-file.syms new file mode 100644 index 00000000000..635716c6b06 --- /dev/null +++ b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/line-table-missing-file.syms @@ -0,0 +1,7 @@ +MODULE Linux x86_64 761550E08086333960A9074A9CE2895C0 a.out +INFO CODE_ID E05015768680393360A9074A9CE2895C +FILE 0 /tmp/a.c +FUNC b0 10 0 func +b0 1 1 0 +b1 1 2 0 +b2 1 2 1 diff --git a/lldb/test/Shell/SymbolFile/Breakpad/Inputs/line-table-mixed-path-styles.syms b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/line-table-mixed-path-styles.syms new file mode 100644 index 00000000000..a0708e54dc0 --- /dev/null +++ b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/line-table-mixed-path-styles.syms @@ -0,0 +1,7 @@ +MODULE Linux x86_64 761550E08086333960A9074A9CE2895C0 a.out +INFO CODE_ID E05015768680393360A9074A9CE2895C +FILE 0 /tmp/a.c +FILE 1 c:\tmp\b.c +FUNC b0 10 0 func +b0 1 1 0 +b1 1 1 1 diff --git a/lldb/test/Shell/SymbolFile/Breakpad/Inputs/line-table.syms b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/line-table.syms new file mode 100644 index 00000000000..e608eb8033e --- /dev/null +++ b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/line-table.syms @@ -0,0 +1,17 @@ +MODULE Linux x86_64 761550E08086333960A9074A9CE2895C0 a.out +INFO CODE_ID E05015768680393360A9074A9CE2895C +FILE 0 /tmp/a.c +FILE 1 /tmp/c.c +FILE 2 /tmp/d.c +FUNC b0 10 0 func +b0 1 1 0 +b1 1 2 0 +b2 1 2 1 +b4 1 3 1 +FUNC c0 10 0 func2 +c0 2 1 1 +c2 2 2 0 +FUNC d0 10 0 func3 +d0 2 1 2 +FUNC e0 10 0 func4 +e0 2 2 2 diff --git a/lldb/test/Shell/SymbolFile/Breakpad/Inputs/stack-cfi-parsing.syms b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/stack-cfi-parsing.syms new file mode 100644 index 00000000000..1ebecb48022 --- /dev/null +++ b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/stack-cfi-parsing.syms @@ -0,0 +1,20 @@ +MODULE Linux x86_64 E5894855C35DCCCCCCCCCCCCCCCCCCCC0 linux.out +INFO CODE_ID E35C283BC327C28762DB788BF5A4078BE2351448 +FUNC 0 2 0 func0 +FUNC 2 1 0 func2 +FUNC 3 1 0 func3 +FUNC 4 1 0 func4 +FUNC 5 1 0 func5 +FUNC 6 1 0 func6 +FUNC 7 2 0 func7 +FUNC 9 1 0 func9 +STACK CFI INIT 0 2 .cfa: $rsp .ra: .cfa $rbp: $rsp +STACK CFI 1 $rbp: $rax $rbx: $rcx +STACK CFI INIT 2 1 $r47: $r42 +STACK CFI INIT 3 1 $rbp: +STACK CFI INIT 4 1 $rbp +STACK CFI INIT 5 1 $rbp: $rbx $rsp: +STACK CFI INIT 6 1 $rbp: $rsp: +STACK CFI INIT 7 1 .cfa: $rsp +STACK CFI bogus +STACK CFI INIT 9 1 .cfa: $rbp .ra: $rax diff --git a/lldb/test/Shell/SymbolFile/Breakpad/Inputs/stack-cfi-parsing.yaml b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/stack-cfi-parsing.yaml new file mode 100644 index 00000000000..9f3a6316986 --- /dev/null +++ b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/stack-cfi-parsing.yaml @@ -0,0 +1,36 @@ +--- !minidump +Streams: + - Type: ThreadList + Threads: + - Thread Id: 0x00003E81 + Context: DEAD + Stack: + Start of Memory Range: 0x00007FFCEB34A000 + Content: DEAD + - Type: ModuleList + Modules: + - Base of Image: 0x0000000000400000 + Size of Image: 0x00001000 + Module Name: '/tmp/stack-cfi-parsing.out' + CodeView Record: 4C457042E35C283BC327C28762DB788BF5A4078BE2351448 + - Type: SystemInfo + Processor Arch: AMD64 + Processor Level: 6 + Processor Revision: 15876 + Number of Processors: 40 + Platform ID: Linux + CSD Version: 'Linux 3.13.0-91-generic' + CPU: + Vendor ID: GenuineIntel + Version Info: 0x00000000 + Feature Info: 0x00000000 + - Type: LinuxProcStatus + Text: | + Name: linux-x86_64 + State: t (tracing stop) + Tgid: 29917 + Ngid: 0 + Pid: 29917 + PPid: 29370 + +... diff --git a/lldb/test/Shell/SymbolFile/Breakpad/Inputs/symtab-macho.syms b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/symtab-macho.syms new file mode 100644 index 00000000000..da6a7568698 --- /dev/null +++ b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/symtab-macho.syms @@ -0,0 +1,2 @@ +MODULE mac x86_64 B305176022B17D7B39F9240E077D625B0 mac.out +PUBLIC ff0 0 _start diff --git a/lldb/test/Shell/SymbolFile/Breakpad/Inputs/symtab.syms b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/symtab.syms new file mode 100644 index 00000000000..3fd14643bb0 --- /dev/null +++ b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/symtab.syms @@ -0,0 +1,9 @@ +MODULE Linux x86_64 761550E08086333960A9074A9CE2895C0 a.out +INFO CODE_ID E05015768680393360A9074A9CE2895C +FILE 0 /tmp/a.c +PUBLIC b0 0 f1 +PUBLIC m c0 0 f2 +PUBLIC d0 0 _start +PUBLIC ff 0 _out_of_range_ignored +FUNC b0 c 0 f1_func +FUNC m a0 d 0 func_only diff --git a/lldb/test/Shell/SymbolFile/Breakpad/Inputs/unwind-via-raSearch.syms b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/unwind-via-raSearch.syms new file mode 100644 index 00000000000..329a280bde8 --- /dev/null +++ b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/unwind-via-raSearch.syms @@ -0,0 +1,15 @@ +MODULE windows x86 897DD83EA8C8411897F3A925EE4BF7411 unwind-via-stack-win.pdb +INFO CODE_ID 5D499B5C5000 unwind-via-stack-win.exe +PUBLIC 0 0 dummy +PUBLIC 10 0 call_many +PUBLIC 80 0 main +PUBLIC 90 0 many_pointer_args +PUBLIC 100 0 complex_rasearch +PUBLIC 110 0 esp_rasearch +PUBLIC 120 0 nonzero_frame_size +STACK WIN 4 10 6d 0 0 0 0 0 0 1 $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = +STACK WIN 4 80 8 0 0 0 0 0 0 1 $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = +STACK WIN 4 90 5 0 0 50 0 0 0 1 $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = +STACK WIN 4 100 4 0 0 0 0 0 0 1 $T0 .raSearch 80 + = $eip $T0 ^ = $esp $T0 4 + = +STACK WIN 4 110 4 0 0 0 0 0 0 1 $T0 .raSearch = $eip $T0 ^ = $esp .raSearch 4 + = +STACK WIN 4 120 4 0 0 0 4 8 0 1 $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = diff --git a/lldb/test/Shell/SymbolFile/Breakpad/Inputs/unwind-via-stack-cfi.syms b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/unwind-via-stack-cfi.syms new file mode 100644 index 00000000000..d4c8287e68a --- /dev/null +++ b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/unwind-via-stack-cfi.syms @@ -0,0 +1,6 @@ +MODULE Linux x86_64 603FCF6CA7FF4BCC86AE8FF44DB2576A0 linux-x86_64_not_crashed +INFO CODE_ID 6CCF3F60FFA7CC4B86AE8FF44DB2576A68983611 +PUBLIC 420 0 bar +PUBLIC 450 0 foo +PUBLIC 480 0 _start +STACK CFI INIT 420 29 .cfa: $rbp ^ .ra: .cfa 8 + ^ $rsp: .cfa 16 + $rbp: .cfa ^ diff --git a/lldb/test/Shell/SymbolFile/Breakpad/Inputs/unwind-via-stack-cfi.yaml b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/unwind-via-stack-cfi.yaml new file mode 100644 index 00000000000..0672f9e6123 --- /dev/null +++ b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/unwind-via-stack-cfi.yaml @@ -0,0 +1,43 @@ +--- !minidump +Streams: + - Type: ThreadList + Threads: + - Thread Id: 0x000074F3 + Context: 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000B001000000000006CAE000000006B7FC05A0000C81D415A0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000A2BF9E5A6B7F0000000000000000000000000000000000008850C14BFD7F00009850C14BFD7F00000100000000000000B04AC14BFD7F0000000000000000000060812D01000000000800000000000000B065E05A6B7F00008004400000000000E050C14BFD7F00000000000000000000000000000000000030044000000000007F03FFFF0000FFFFFFFFFFFF000000000000000000000000801F00006B7F00000400000000000000B84CC14BFD7F0000304D405A6B7F0000C84DC14BFD7F0000C0AA405A6B7F00004F033D0000000000B84DC14BFD7F0000E84DC14BFD7F0000000000000000000000000000000000000070E05A6B7F000078629E5A6B7F0000C81D415A6B7F0000804F9E5A6B7F00000000000001000000E603000001000000E093115A6B7F0000804EC14BFD7F0000584EC14BFD7F000099ADC05A6B7F00000100000000000000AAAAD77D0000000002000000000000000800000000000000B065E05A6B7F0000E6B7C05A6B7F0000010000006B7F0000884DC14BFD7F0000106F7C5A6B7F0000984EC14BFD7F0000488B7C5A6B7F0000C4A71CB90000000001000000000000000800000000000000B065E05A6B7F000048B6C05A6B7F0000702AE25A6B7F0000D84DC14BFD7F000030489E5A6B7F0000E84EC14BFD7F0000E05E9E5A6B7F00000991F0460000000001000000000000000800000000000000B065E05A6B7F000048B6C05A6B7F00000100000000000000284EC14BFD7F00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + Stack: + Start of Memory Range: 0x00007FFD4BC15080 + Content: 30044000000000000000000000000000FFFFFFFF03000000B850C14BFD7F0000670440000000000000000000000000000000000001000000D850C14BFD7F0000970440000000000000000000000000000000000000000000000000000000000001000000000000009F67C14BFD7F00000000000000000000BA67C14BFD7F0000 + - Type: ModuleList + Modules: + - Base of Image: 0x0000000000400000 + Size of Image: 0x00001000 + Module Name: '/tmp/unwind-via-stack-cfi' + CodeView Record: 4C4570426CCF3F60FFA7CC4B86AE8FF44DB2576A68983611 + - Type: MemoryList + Memory Ranges: + - Start of Memory Range: 0x00007FFD4BC15080 + Content: 30044000000000000000000000000000FFFFFFFF03000000B850C14BFD7F0000670440000000000000000000000000000000000001000000D850C14BFD7F0000970440000000000000000000000000000000000000000000000000000000000001000000000000009F67C14BFD7F00000000000000000000BA67C14BFD7F0000 + - Type: SystemInfo + Processor Arch: AMD64 + Processor Level: 6 + Processor Revision: 15876 + Number of Processors: 40 + Platform ID: Linux + CSD Version: 'Linux 3.13.0-91-generic' + CPU: + Vendor ID: GenuineIntel + Version Info: 0x00000000 + Feature Info: 0x00000000 + - Type: LinuxProcStatus + Text: | + Name: unwind-via-stack-cfi + State: t (tracing stop) + Tgid: 29939 + Ngid: 0 + Pid: 29939 + PPid: 29370 + TracerPid: 29940 + Uid: 1001 1001 1001 1001 + Gid: 1001 1001 1001 1001 + +... diff --git a/lldb/test/Shell/SymbolFile/Breakpad/Inputs/unwind-via-stack-win.syms b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/unwind-via-stack-win.syms new file mode 100644 index 00000000000..b9b8a67095f --- /dev/null +++ b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/unwind-via-stack-win.syms @@ -0,0 +1,17 @@ +MODULE windows x86 897DD83EA8C8411897F3A925EE4BF7411 unwind-via-stack-win.pdb +INFO CODE_ID 5D499B5C5000 unwind-via-stack-win.exe +PUBLIC 0 0 dummy +PUBLIC 10 0 call_many +PUBLIC 80 0 main +PUBLIC 90 0 many_pointer_args +PUBLIC 100 0 bogus_rule +PUBLIC 110 0 bogus_cfa_rhs +PUBLIC 120 0 bogus_esp_rhs +PUBLIC 130 0 temporary_var +STACK WIN 4 10 6d 0 0 0 0 0 0 1 $T0 $esp 80 + = $eip $T0 ^ = $esp $T0 4 + = +STACK WIN 4 80 8 0 0 0 0 0 0 1 $T0 $esp = $eip $T0 ^ = $esp $T0 4 + = +STACK WIN 4 90 5 0 0 50 0 0 0 1 $T0 $esp = $eip $T0 ^ = $esp $T0 4 + = +STACK WIN 4 100 4 0 0 0 0 0 0 1 bogus +STACK WIN 4 110 4 0 0 0 0 0 0 1 $T0 $bogus = $eip $T0 ^ = $esp $T0 4 + = +STACK WIN 4 120 4 0 0 0 0 0 0 1 $T0 $esp = $eip $T0 ^ = $esp $bogus 4 + = +STACK WIN 4 130 4 0 0 0 0 0 0 1 $T0 $esp = $bogus $T0 = $eip $bogus ^ = $esp $T0 4 + = diff --git a/lldb/test/Shell/SymbolFile/Breakpad/Inputs/unwind-via-stack-win.yaml b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/unwind-via-stack-win.yaml new file mode 100644 index 00000000000..399cf2bbaa3 --- /dev/null +++ b/lldb/test/Shell/SymbolFile/Breakpad/Inputs/unwind-via-stack-win.yaml @@ -0,0 +1,37 @@ +--- !minidump +Streams: + - Type: ThreadList + Threads: + - Thread Id: 0x0000290C + Priority Class: 0x00000020 + Environment Block: 0x0000000000A98000 + Context: 3F0001000000000000000000000000000000000000000000000000007F02000000000000FFFF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002B000000530000002B0000002B00000080100B0080100B000050A90080100B0080100B0000000000E4FECF0092100B0023000000440301007CFECF002B0000007F0200000000000000000000000000000000000000000000801F0000FFFF020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000144E3D6C2000000001000000EA1E00F4C000E50700000000FC0100002CE3C014D8E202010000E507880F401D839DC60100000000400000007F00000000000000880F401D0A000000900F401D0000000000000100EA1E00009808E5077F00000000000000000000009008E507990100006002E5072CABC87708346474B42300000100000044E3C014200000000000000020532777A80F401D4F346474D00F401D6F378CCC5C4CD5010000000000000000000000000000000000000000000000003AFCD72F90E3C01418CE3470B4230000B80F401DC00F401DC80F401DD00F401D + Stack: + Start of Memory Range: 0x0000000000CFFE78 + Content: 0000000079100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0085100B0094842777 + - Type: ModuleList + Modules: + - Base of Image: 0x00000000000B1000 + Size of Image: 0x00004000 + Module Name: 'unwind-via-stack-win.exe' + CodeView Record: 525344533ED87D89C8A8184197F3A925EE4BF74101000000433A5C70726F6A656374735C746573745F6170705C436F6E736F6C654170706C69636174696F6E315C44656275675C436F6E736F6C654170706C69636174696F6E312E70646200 + - Base of Image: 0x0000000077260000 + Size of Image: 0x000E0000 + Module Name: 'C:\Windows\System32\kernel32.dll' + CodeView Record: 5253445300F90A57CF8DED8A463A90390318CD4401000000776B65726E656C33322EFFFFFFFF + - Type: MemoryList + Memory Ranges: + - Start of Memory Range: 0x0000000000CFFE78 + Content: 0000000079100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0085100B0094842777 + - Type: MemoryInfoList + Content: 1000000030000000020000000000000000100B00000000000000000000000000000000000000000000400000000000000010000010000000000000010000000000002677000000000000000000000000000000000000000000000E000000000000100000100000000000000100000000 + - Type: SystemInfo + Processor Arch: X86 + Platform ID: Win32NT + CPU: + Vendor ID: AuthenticAMD + Version Info: 0x00800F82 + Feature Info: 0x178BFBFF + - Type: MiscInfo + Content: 54050000F703000008290000C883495D0000000000000000AC0D000098080000AC0D00000200000002000000002000000D0000000000000002000000C4FFFFFF430065006E007400720061006C0020004500750072006F007000650020005300740061006E0064006100720064002000540069006D006500000000000000000000000A0000000500030000000000000000000000430065006E007400720061006C0020004500750072006F00700065002000530075006D006D00650072002000540069006D00650000000000000000000000000000000300000005000200000000000000C4FFFFFF310037003100330034002E0031002E007800380036006600720065002E007200730034005F00720065006C0065006100730065002E003100380030003400310030002D00310038003000340000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064006200670063006F00720065002E0069003300380036002C00310030002E0030002E00310037003100330034002E0031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006C816B92 +... diff --git a/lldb/test/Shell/SymbolFile/Breakpad/line-table-discontinuous-file-ids.test b/lldb/test/Shell/SymbolFile/Breakpad/line-table-discontinuous-file-ids.test new file mode 100644 index 00000000000..3b48f4f3c5a --- /dev/null +++ b/lldb/test/Shell/SymbolFile/Breakpad/line-table-discontinuous-file-ids.test @@ -0,0 +1,13 @@ +# Test that we handle files which has gaps in the FILE record IDs. + +# RUN: yaml2obj %S/Inputs/basic-elf.yaml > %T/line-table-discontinuous-file-ids.out +# RUN: %lldb %T/line-table-discontinuous-file-ids.out \ +# RUN: -o "target symbols add -s line-table-discontinuous-file-ids.out %S/Inputs/line-table-discontinuous-file-ids.syms" \ +# RUN: -s %s -o exit | FileCheck %s + +image dump line-table a.c +# CHECK-LABEL: Line table for /tmp/a.c +# CHECK-NEXT: 0x00000000004000b0: /tmp/a.c:1 +# CHECK-NEXT: 0x00000000004000b1: /tmp/a.c:2 +# CHECK-NEXT: 0x00000000004000b2: /tmp/c.c:2 +# CHECK-NEXT: 0x00000000004000b3: diff --git a/lldb/test/Shell/SymbolFile/Breakpad/line-table-edgecases.test b/lldb/test/Shell/SymbolFile/Breakpad/line-table-edgecases.test new file mode 100644 index 00000000000..3a097725a97 --- /dev/null +++ b/lldb/test/Shell/SymbolFile/Breakpad/line-table-edgecases.test @@ -0,0 +1,21 @@ +# Test handling of breakpad files with some unusual or erroneous constructs. The +# input contains a LINE record which does not belong to any function as well as +# a FUNC record without any LINE records. + +# RUN: yaml2obj %S/Inputs/basic-elf.yaml > %T/line-table-edgecases.out +# RUN: %lldb %T/line-table-edgecases.out \ +# RUN: -o "target symbols add -s line-table-edgecases.out %S/Inputs/line-table-edgecases.syms" \ +# RUN: -s %s -o exit | FileCheck %s + +# Test that line table for func2 was parsed properly: +image dump line-table a.c +# CHECK-LABEL: Line table for /tmp/a.c +# CHECK-NEXT: 0x00000000004000c0: /tmp/a.c:2 +# CHECK-NEXT: 0x00000000004000c2: +# CHECK-EMPTY: + +# Looking up an address inside func should still work even if it does not result +# in a line entry. +image lookup -a 0x4000b2 -v +# CHECK-LABEL: image lookup -a 0x4000b2 -v +# CHECK: Summary: line-table-edgecases.out`func + 2 diff --git a/lldb/test/Shell/SymbolFile/Breakpad/line-table-missing-file.test b/lldb/test/Shell/SymbolFile/Breakpad/line-table-missing-file.test new file mode 100644 index 00000000000..0c0fb3f8ea8 --- /dev/null +++ b/lldb/test/Shell/SymbolFile/Breakpad/line-table-missing-file.test @@ -0,0 +1,17 @@ +# Test that we do something reasonable if a LINE record references a +# non-existing FILE record. +# Right now, "something reasonable" means creating a line entry with an empty +# file. + +# RUN: yaml2obj %S/Inputs/basic-elf.yaml > %T/line-table-missing-file.out +# RUN: %lldb %T/line-table-missing-file.out \ +# RUN: -o "target symbols add -s line-table-missing-file.out %S/Inputs/line-table-missing-file.syms" \ +# RUN: -s %s -o exit | FileCheck %s + +image dump line-table a.c +# CHECK-LABEL: Line table for /tmp/a.c +# CHECK-NEXT: 0x00000000004000b0: /tmp/a.c:1 +# CHECK-NEXT: 0x00000000004000b1: /tmp/a.c:2 +# CHECK-NEXT: 0x00000000004000b2: :2 +# CHECK-NEXT: 0x00000000004000b3: +# CHECK-EMPTY: diff --git a/lldb/test/Shell/SymbolFile/Breakpad/line-table-mixed-path-styles.test b/lldb/test/Shell/SymbolFile/Breakpad/line-table-mixed-path-styles.test new file mode 100644 index 00000000000..617b5eb6a9f --- /dev/null +++ b/lldb/test/Shell/SymbolFile/Breakpad/line-table-mixed-path-styles.test @@ -0,0 +1,11 @@ +# RUN: yaml2obj %S/Inputs/basic-elf.yaml > %T/line-table-mixed-path-styles.out +# RUN: %lldb %T/line-table-mixed-path-styles.out \ +# RUN: -o "target symbols add -s line-table-mixed-path-styles.out %S/Inputs/line-table-mixed-path-styles.syms" \ +# RUN: -s %s -o exit | FileCheck %s + +image dump line-table a.c +# CHECK-LABEL: Line table for /tmp/a.c +# CHECK-NEXT: 0x00000000004000b0: /tmp/a.c:1 +# CHECK-NEXT: 0x00000000004000b1: c:\tmp\b.c:1 +# CHECK-NEXT: 0x00000000004000b2: +# CHECK-EMPTY: diff --git a/lldb/test/Shell/SymbolFile/Breakpad/line-table.test b/lldb/test/Shell/SymbolFile/Breakpad/line-table.test new file mode 100644 index 00000000000..f5661cf7ee9 --- /dev/null +++ b/lldb/test/Shell/SymbolFile/Breakpad/line-table.test @@ -0,0 +1,45 @@ +# RUN: yaml2obj %S/Inputs/basic-elf.yaml > %T/line-table.out +# RUN: %lldb %T/line-table.out -o "target symbols add -s line-table.out %S/Inputs/line-table.syms" \ +# RUN: -s %s -o exit | FileCheck %s + +# We create a compile unit for each function. The compile unit name is the first +# line table entry in that function. +# This symbol file contains a single function in the "compile unit" a.c. This +# function has two line table sequences. +image dump line-table a.c +# CHECK-LABEL: Line table for /tmp/a.c +# CHECK-NEXT: 0x00000000004000b0: /tmp/a.c:1 +# CHECK-NEXT: 0x00000000004000b1: /tmp/a.c:2 +# CHECK-NEXT: 0x00000000004000b2: /tmp/c.c:2 +# CHECK-NEXT: 0x00000000004000b3: +# CHECK-EMPTY: +# CHECK-NEXT: 0x00000000004000b4: /tmp/c.c:3 +# CHECK-NEXT: 0x00000000004000b5: +# CHECK-EMPTY: + +# Single compile unit for c.c with a single line sequence. +image dump line-table c.c +# CHECK-LABEL: Line table for /tmp/c.c +# CHECK-NEXT: 0x00000000004000c0: /tmp/c.c:1 +# CHECK-NEXT: 0x00000000004000c2: /tmp/a.c:2 +# CHECK-NEXT: 0x00000000004000c4: +# CHECK-EMPTY: + +# There are two compile units called "d.c". Hence, two line tables. +image dump line-table d.c +# CHECK-LABEL: Line table for /tmp/d.c +# CHECK-NEXT: 0x00000000004000d0: /tmp/d.c:1 +# CHECK-NEXT: 0x00000000004000d2: +# CHECK-EMPTY: +# CHECK-LABEL: Line table for /tmp/d.c +# CHECK-NEXT: 0x00000000004000e0: /tmp/d.c:2 +# CHECK-NEXT: 0x00000000004000e2: +# CHECK-EMPTY: + +image lookup -a 0x4000b2 -v +# CHECK-LABEL: image lookup -a 0x4000b2 -v +# CHECK: Summary: line-table.out`func + 2 + +breakpoint set -f c.c -l 2 +# CHECK-LABEL: breakpoint set -f c.c -l 2 +# CHECK: Breakpoint 1: where = line-table.out`func + 2, address = 0x00000000004000b2 diff --git a/lldb/test/Shell/SymbolFile/Breakpad/stack-cfi-parsing.test b/lldb/test/Shell/SymbolFile/Breakpad/stack-cfi-parsing.test new file mode 100644 index 00000000000..ffb64602c15 --- /dev/null +++ b/lldb/test/Shell/SymbolFile/Breakpad/stack-cfi-parsing.test @@ -0,0 +1,52 @@ +# RUN: yaml2obj %S/Inputs/stack-cfi-parsing.yaml > %t +# RUN: %lldb -c %t -o "target symbols add %S/Inputs/stack-cfi-parsing.syms" \ +# RUN: -s %s -b | FileCheck %s + +image show-unwind -n func0 +# CHECK-LABEL: image show-unwind -n func0 +# CHECK: Asynchronous (not restricted to call-sites) UnwindPlan is 'breakpad STACK CFI' +# CHECK: Synchronous (restricted to call-sites) UnwindPlan is 'breakpad STACK CFI' +# CHECK: Symbol file UnwindPlan: +# CHECK-NEXT: This UnwindPlan originally sourced from breakpad STACK CFI +# CHECK-NEXT: This UnwindPlan is sourced from the compiler: yes. +# CHECK-NEXT: This UnwindPlan is valid at all instruction locations: no. +# CHECK-NEXT: Address range of this UnwindPlan: [stack-cfi-parsing.out..module_image + 0-0x0000000000000002) +# CHECK-NEXT: row[0]: 0: CFA=DW_OP_breg7 +0 => rbp=DW_OP_breg7 +0 rip=DW_OP_pick 0x00 +# CHECK-NEXT: row[1]: 1: CFA=DW_OP_breg7 +0 => rbx=DW_OP_breg2 +0 rbp=DW_OP_breg0 +0 rip=DW_OP_pick 0x00 + +# The following plans are all (syntactically) invalid for various reasons. +# Processing those should not cause a crash. + +image show-unwind -n func2 +# CHECK-LABEL: image show-unwind -n func2 +# CHECK-NOT: Symbol file + +image show-unwind -n func3 +# CHECK-LABEL: image show-unwind -n func3 +# CHECK-NOT: Symbol file + +image show-unwind -n func4 +# CHECK-LABEL: image show-unwind -n func4 +# CHECK-NOT: Symbol file + +image show-unwind -n func5 +# CHECK-LABEL: image show-unwind -n func5 +# CHECK-NOT: Symbol file + +image show-unwind -n func6 +# CHECK-LABEL: image show-unwind -n func6 +# CHECK-NOT: Symbol file + +image show-unwind -n func7 +# CHECK-LABEL: image show-unwind -n func7 +# CHECK-NOT: Symbol file + +# Finally, try an unwind plan with just a single row +image show-unwind -n func9 +# CHECK-LABEL: image show-unwind -n func9 +# CHECK: Asynchronous (not restricted to call-sites) UnwindPlan is 'breakpad STACK CFI' +# CHECK: Synchronous (restricted to call-sites) UnwindPlan is 'breakpad STACK CFI' +# CHECK: Symbol file UnwindPlan: +# CHECK: Address range of this UnwindPlan: [stack-cfi-parsing.out..module_image + 9-0x000000000000000a) +# CHECK: row[0]: 0: CFA=DW_OP_breg6 +0 => rip=DW_OP_breg0 +0 + diff --git a/lldb/test/Shell/SymbolFile/Breakpad/symtab-macho.test b/lldb/test/Shell/SymbolFile/Breakpad/symtab-macho.test new file mode 100644 index 00000000000..59538649d8f --- /dev/null +++ b/lldb/test/Shell/SymbolFile/Breakpad/symtab-macho.test @@ -0,0 +1,21 @@ +# RUN: yaml2obj %S/Inputs/basic-macho.yaml > %T/symtab-macho.out +# RUN: %lldb %T/symtab-macho.out -o "target symbols add %S/Inputs/symtab-macho.syms" \ +# RUN: -s %s | FileCheck %s + +image dump symtab symtab-macho.out +# CHECK-LABEL: (lldb) image dump symtab symtab-macho.out +# CHECK: Symtab, file = {{.*}}symtab-macho.out, num_symbols = 1: +# CHECK: Index UserID DSX Type File Address/Value Load Address Size Flags Name +# CHECK: [ 0] 0 X Code 0x0000000100000ff0 0x0000000000000006 0x00000000 _start + +# CHECK-LABEL: (lldb) image lookup -a 0x100000ff0 -v +# CHECK: Address: symtab-macho.out[0x0000000100000ff0] (symtab-macho.out.__TEXT.__text + 0) +# CHECK: Symbol: id = {0x00000000}, range = [0x0000000100000ff0-0x0000000100000ff6), name="_start" + +# CHECK-LABEL: (lldb) image lookup -n _start -v +# CHECK: Address: symtab-macho.out[0x0000000100000ff0] (symtab-macho.out.__TEXT.__text + 0) +# CHECK: Symbol: id = {0x00000000}, range = [0x0000000100000ff0-0x0000000100000ff6), name="_start" + +image lookup -a 0x100000ff0 -v +image lookup -n _start -v +exit diff --git a/lldb/test/Shell/SymbolFile/Breakpad/symtab.test b/lldb/test/Shell/SymbolFile/Breakpad/symtab.test new file mode 100644 index 00000000000..65bf9517461 --- /dev/null +++ b/lldb/test/Shell/SymbolFile/Breakpad/symtab.test @@ -0,0 +1,25 @@ +# RUN: yaml2obj %S/Inputs/basic-elf.yaml > %T/symtab.out +# RUN: %lldb %T/symtab.out -o "target symbols add -s symtab.out %S/Inputs/symtab.syms" \ +# RUN: -s %s | FileCheck %s + +# CHECK-LABEL: (lldb) image dump symtab symtab.out +# CHECK: Symtab, file = {{.*}}symtab.out, num_symbols = 5: +# CHECK: Index UserID DSX Type File Address/Value Load Address Size Flags Name +# CHECK: [ 0] 0 SX Code 0x0000000000400000 0x00000000000000b0 0x00000000 ___lldb_unnamed_symbol{{[0-9]*}}$$symtab.out +# CHECK: [ 1] 0 X Code 0x00000000004000c0 0x0000000000000010 0x00000000 f2 +# CHECK: [ 2] 0 X Code 0x00000000004000d0 0x0000000000000022 0x00000000 _start +# CHECK: [ 3] 0 X Code 0x00000000004000a0 0x000000000000000d 0x00000000 func_only +# CHECK: [ 4] 0 X Code 0x00000000004000b0 0x000000000000000c 0x00000000 f1_func + +# CHECK-LABEL: (lldb) image lookup -a 0x4000b0 -v +# CHECK: Address: symtab.out[0x00000000004000b0] (symtab.out.PT_LOAD[0]..text2 + 0) +# CHECK: Symbol: id = {0x00000000}, range = [0x00000000004000b0-0x00000000004000bc), name="f1_func" + +# CHECK-LABEL: (lldb) image lookup -n f2 -v +# CHECK: Address: symtab.out[0x00000000004000c0] (symtab.out.PT_LOAD[0]..text2 + 16) +# CHECK: Symbol: id = {0x00000000}, range = [0x00000000004000c0-0x00000000004000d0), name="f2" + +image dump symtab symtab.out +image lookup -a 0x4000b0 -v +image lookup -n f2 -v +exit diff --git a/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-raSearch.test b/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-raSearch.test new file mode 100644 index 00000000000..ea259a9de7e --- /dev/null +++ b/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-raSearch.test @@ -0,0 +1,43 @@ +# RUN: yaml2obj %S/Inputs/unwind-via-stack-win.yaml > %t +# RUN: %lldb -c %t \ +# RUN: -o "target symbols add %S/Inputs/unwind-via-raSearch.syms" \ +# RUN: -s %s -b | FileCheck %s + +# First check that unwind plan generation works correctly. +# This function has a "typical" unwind rule. +image show-unwind -n call_many +# CHECK-LABEL: image show-unwind -n call_many +# CHECK: UNWIND PLANS for unwind-via-stack-win.exe`call_many +# CHECK: Symbol file UnwindPlan: +# CHECK: This UnwindPlan originally sourced from breakpad STACK WIN +# CHECK: This UnwindPlan is sourced from the compiler: yes. +# CHECK: This UnwindPlan is valid at all instruction locations: no. +# CHECK: Address range of this UnwindPlan: [unwind-via-stack-win.exe..module_image + 16-0x0000007d) +# CHECK: row[0]: 0: CFA=RaSearch@SP+0 => esp=DW_OP_pick 0x00, DW_OP_consts +4, DW_OP_plus eip=DW_OP_pick 0x00, DW_OP_deref + +image show-unwind -n nonzero_frame_size +# CHECK-LABEL: image show-unwind -n nonzero_frame_size +# CHECK: UNWIND PLANS for unwind-via-stack-win.exe`nonzero_frame_size +# CHECK: Symbol file UnwindPlan: +# CHECK: row[0]: 0: CFA=RaSearch@SP+12 => esp=DW_OP_pick 0x00, DW_OP_consts +4, DW_OP_plus eip=DW_OP_pick 0x00, DW_OP_deref + +# Then, some invalid rules. +image show-unwind -n complex_rasearch +# CHECK-LABEL: image show-unwind -n complex_rasearch +# CHECK: UNWIND PLANS for unwind-via-stack-win.exe`complex_rasearch +# CHECK-NOT: Symbol file + +image show-unwind -n esp_rasearch +# CHECK-LABEL: image show-unwind -n esp_rasearch +# CHECK: UNWIND PLANS for unwind-via-stack-win.exe`esp_rasearch +# CHECK-NOT: Symbol file + +# And finally, check that backtracing works as a whole by unwinding a simple +# stack. +thread backtrace +# CHECK-LABEL: thread backtrace +# CHECK: frame #0: 0x000b1092 unwind-via-stack-win.exe`many_pointer_args +# CHECK: frame #1: 0x000b1079 unwind-via-stack-win.exe`call_many + 105 +# CHECK: frame #2: 0x000b1085 unwind-via-stack-win.exe`main + 5 +# CHECK: frame #3: 0x77278494 kernel32.dll +# CHECK-NOT: frame diff --git a/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-cfi.test b/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-cfi.test new file mode 100644 index 00000000000..9a6c2166c13 --- /dev/null +++ b/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-cfi.test @@ -0,0 +1,20 @@ +# RUN: yaml2obj %S/Inputs/unwind-via-stack-cfi.yaml > %t +# RUN: %lldb -c %t -o "target symbols add %S/Inputs/unwind-via-stack-cfi.syms" \ +# RUN: -s %s -b | FileCheck %s + +image show-unwind -n bar +# CHECK-LABEL: image show-unwind -n bar +# CHECK: Asynchronous (not restricted to call-sites) UnwindPlan is 'breakpad STACK CFI' +# CHECK: Synchronous (restricted to call-sites) UnwindPlan is 'breakpad STACK CFI' +# CHECK: Symbol file UnwindPlan: +# CHECK-NEXT: This UnwindPlan originally sourced from breakpad STACK CFI +# CHECK-NEXT: This UnwindPlan is sourced from the compiler: yes. +# CHECK-NEXT: This UnwindPlan is valid at all instruction locations: no. +# CHECK-NEXT: Address range of this UnwindPlan: [unwind-via-stack-cfi..module_image + 1056-0x0000000000000449) +# CHECK-NEXT: row[0]: 0: CFA=DW_OP_breg6 +0, DW_OP_deref => rbp=DW_OP_pick 0x00, DW_OP_deref rsp=DW_OP_pick 0x00, DW_OP_consts +16, DW_OP_plus rip=DW_OP_pick 0x00, DW_OP_consts +8, DW_OP_plus , DW_OP_deref + +thread backtrace +# CHECK-LABEL: thread backtrace +# CHECK: frame #0: 0x0000000000400430 unwind-via-stack-cfi`bar + 16 +# CHECK: frame #1: 0x0000000000400497 unwind-via-stack-cfi`_start + 23 +# CHECK-NOT: frame diff --git a/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-win.test b/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-win.test new file mode 100644 index 00000000000..2e04ed68844 --- /dev/null +++ b/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-win.test @@ -0,0 +1,54 @@ +# RUN: yaml2obj %S/Inputs/unwind-via-stack-win.yaml > %t +# RUN: %lldb -c %t \ +# RUN: -o "target symbols add %S/Inputs/unwind-via-stack-win.syms" \ +# RUN: -s %s -b | FileCheck %s + +# First check that unwind plan generation works correctly. +# This function has a "typical" unwind rule. +image show-unwind -n call_many +# CHECK-LABEL: image show-unwind -n call_many +# CHECK: UNWIND PLANS for unwind-via-stack-win.exe`call_many +# CHECK: Symbol file UnwindPlan: +# CHECK: This UnwindPlan originally sourced from breakpad STACK WIN +# CHECK: This UnwindPlan is sourced from the compiler: yes. +# CHECK: This UnwindPlan is valid at all instruction locations: no. +# CHECK: Address range of this UnwindPlan: [unwind-via-stack-win.exe..module_image + 16-0x0000007d) +# CHECK: row[0]: 0: CFA=DW_OP_breg7 +0, DW_OP_consts +80, DW_OP_plus => esp=DW_OP_pick 0x00, DW_OP_consts +4, DW_OP_plus eip=DW_OP_pick 0x00, DW_OP_deref + +# Then, some invalid rules. +image show-unwind -n bogus_rule +# CHECK-LABEL: image show-unwind -n bogus_rule +# CHECK: UNWIND PLANS for unwind-via-stack-win.exe`bogus_rule +# CHECK-NOT: Symbol file + +image show-unwind -n bogus_cfa_rhs +# CHECK-LABEL: image show-unwind -n bogus_cfa_rhs +# CHECK: UNWIND PLANS for unwind-via-stack-win.exe`bogus_cfa_rhs +# CHECK-NOT: Symbol file + +image show-unwind -n bogus_esp_rhs +# CHECK-LABEL: image show-unwind -n bogus_esp_rhs +# CHECK: UNWIND PLANS for unwind-via-stack-win.exe`bogus_esp_rhs +# CHECK-NOT: Symbol file + +# We don't treat unknown lhs as an error, as it can be just a temporary +# variable used in other rules. +image show-unwind -n temporary_var +# CHECK-LABEL: image show-unwind -n temporary_var +# CHECK: UNWIND PLANS for unwind-via-stack-win.exe`temporary_var +# CHECK: Symbol file UnwindPlan: +# CHECK: This UnwindPlan originally sourced from breakpad STACK WIN +# CHECK: This UnwindPlan is sourced from the compiler: yes. +# CHECK: This UnwindPlan is valid at all instruction locations: no. +# CHECK: Address range of this UnwindPlan: [unwind-via-stack-win.exe..module_image + 304-0x00000134) +# CHECK: row[0]: 0: CFA=DW_OP_breg7 +0 => esp=DW_OP_pick 0x00, DW_OP_consts +4, DW_OP_plus eip=DW_OP_pick 0x00, DW_OP_deref + +# And finally, check that backtracing works as a whole by unwinding a simple +# stack. +thread backtrace +# CHECK-LABEL: thread backtrace +# CHECK: frame #0: 0x000b1092 unwind-via-stack-win.exe`many_pointer_args +# CHECK: frame #1: 0x000b1079 unwind-via-stack-win.exe`call_many + 105 +# CHECK: frame #2: 0x000b1085 unwind-via-stack-win.exe`main + 5 +# CHECK: frame #3: 0x77278494 kernel32.dll +# CHECK-NOT: frame |