[Lldb-commits] [PATCH] D54031: [NativePDB] Make tests work on x86 too

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Fri Nov 2 07:13:17 PDT 2018


Lgtm
On Fri, Nov 2, 2018 at 3:03 AM Aleksandr Urakov via Phabricator <
reviews at reviews.llvm.org> wrote:

> aleksandr.urakov created this revision.
> aleksandr.urakov added reviewers: zturner, stella.stamenova.
> aleksandr.urakov added a project: LLDB.
> Herald added subscribers: lldb-commits, teemperor.
>
> This patch fixes the NativePDB tests to make them work from x86 command
> line too.
>
>
> Repository:
>   rLLDB LLDB
>
> https://reviews.llvm.org/D54031
>
> Files:
>   lit/SymbolFile/NativePDB/disassembly.cpp
>   lit/SymbolFile/NativePDB/simple-breakpoints.cpp
>   lit/SymbolFile/NativePDB/tag-types.cpp
>
>
> Index: lit/SymbolFile/NativePDB/tag-types.cpp
> ===================================================================
> --- lit/SymbolFile/NativePDB/tag-types.cpp
> +++ lit/SymbolFile/NativePDB/tag-types.cpp
> @@ -141,7 +141,7 @@
>  }
>
>  // CHECK:      (lldb) target create "{{.*}}tag-types.cpp.tmp.exe"
> -// CHECK-NEXT: Current executable set to '{{.*}}tag-types.cpp.tmp.exe'
> (x86_64).
> +// CHECK-NEXT: Current executable set to '{{.*}}tag-types.cpp.tmp.exe'
>  // CHECK-NEXT: (lldb) command source -s 0 '{{.*}}tag-types.lldbinit'
>  // CHECK-NEXT: Executing commands in '{{.*}}tag-types.lldbinit'.
>  // CHECK-NEXT: (lldb) type lookup -- Struct
> Index: lit/SymbolFile/NativePDB/simple-breakpoints.cpp
> ===================================================================
> --- lit/SymbolFile/NativePDB/simple-breakpoints.cpp
> +++ lit/SymbolFile/NativePDB/simple-breakpoints.cpp
> @@ -35,30 +35,30 @@
>
>
>  // CHECK:      (lldb) target create "{{.*}}simple-breakpoints.cpp.tmp.exe"
> -// CHECK:      Current executable set to
> '{{.*}}simple-breakpoints.cpp.tmp.exe' (x86_64).
> +// CHECK:      Current executable set to
> '{{.*}}simple-breakpoints.cpp.tmp.exe'
>  // CHECK:      (lldb) break set -n main
> -// CHECK:      Breakpoint 1: where = simple-breakpoints.cpp.tmp.exe`main
> + 21
> +// CHECK:      Breakpoint 1: where = simple-breakpoints.cpp.tmp.exe`main
> + {{[0-9]+}}
>  // CHECK-SAME:               at simple-breakpoints.cpp:31
>  // CHECK:      (lldb) break set -n OvlGlobalFn
>  // CHECK:      Breakpoint 2: 3 locations.
>  // CHECK:      (lldb) break set -n StaticFn
> -// CHECK:      Breakpoint 3: where =
> simple-breakpoints.cpp.tmp.exe`StaticFn + 5
> +// CHECK:      Breakpoint 3: where =
> simple-breakpoints.cpp.tmp.exe`StaticFn + {{[0-9]+}}
>  // CHECK-SAME:               at simple-breakpoints.cpp:24
>  // CHECK:      (lldb) break set -n DoesntExist
>  // CHECK:      Breakpoint 4: no locations (pending).
>  // CHECK:      (lldb) break list
>  // CHECK:      Current breakpoints:
>  // CHECK:      1: name = 'main', locations = 1
> -// CHECK:        1.1: where = simple-breakpoints.cpp.tmp.exe`main + 21
> +// CHECK:        1.1: where = simple-breakpoints.cpp.tmp.exe`main +
> {{[0-9]+}}
>  // CHECK-SAME:                at simple-breakpoints.cpp:31
>  // CHECK:      2: name = 'OvlGlobalFn', locations = 3
> -// CHECK:        2.1: where = simple-breakpoints.cpp.tmp.exe`OvlGlobalFn
> + 5
> +// CHECK:        2.1: where = simple-breakpoints.cpp.tmp.exe`OvlGlobalFn
> + {{[0-9]+}}
>  // CHECK-SAME:                at simple-breakpoints.cpp:13
>  // CHECK:        2.2: where = simple-breakpoints.cpp.tmp.exe`OvlGlobalFn
>  // CHECK-SAME:                at simple-breakpoints.cpp:16
> -// CHECK:        2.3: where = simple-breakpoints.cpp.tmp.exe`OvlGlobalFn
> + 17
> +// CHECK:        2.3: where = simple-breakpoints.cpp.tmp.exe`OvlGlobalFn
> + {{[0-9]+}}
>  // CHECK-SAME:                at simple-breakpoints.cpp:20
>  // CHECK:      3: name = 'StaticFn', locations = 1
> -// CHECK:        3.1: where = simple-breakpoints.cpp.tmp.exe`StaticFn + 5
> +// CHECK:        3.1: where = simple-breakpoints.cpp.tmp.exe`StaticFn +
> {{[0-9]+}}
>  // CHECK-SAME:                at simple-breakpoints.cpp:24
>  // CHECK:      4: name = 'DoesntExist', locations = 0 (pending)
> Index: lit/SymbolFile/NativePDB/disassembly.cpp
> ===================================================================
> --- lit/SymbolFile/NativePDB/disassembly.cpp
> +++ lit/SymbolFile/NativePDB/disassembly.cpp
> @@ -2,7 +2,7 @@
>  // REQUIRES: lld
>
>  // Test that we can show disassembly and source.
> -// RUN: clang-cl /Z7 /GS- /GR- /c /Fo%t.obj -- %s
> +// RUN: clang-cl -m64 /Z7 /GS- /GR- /c /Fo%t.obj -- %s
>  // RUN: lld-link /DEBUG /nodefaultlib /entry:main /OUT:%t.exe /PDB:%t.pdb
> -- %t.obj
>  // RUN: env LLDB_USE_NATIVE_PDB_READER=1 lldb -f %t.exe -s \
>  // RUN:     %p/Inputs/disassembly.lldbinit | FileCheck %s
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20181102/4b2aa7c4/attachment.html>


More information about the lldb-commits mailing list