[PATCH] D89462: [debuginfo-tests] [dexter] Add tests to check debug experience
Tom Weaver via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 28 07:23:52 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGafc44efc262b: [debuginfo-tests][dexter] Add two new debug experience tests (authored by n-omer, committed by TWeaver).
Herald added a project: LLVM.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89462/new/
https://reviews.llvm.org/D89462
Files:
debuginfo-tests/dexter-tests/deferred_globals.cpp
debuginfo-tests/dexter-tests/namespace.cpp
Index: debuginfo-tests/dexter-tests/namespace.cpp
===================================================================
--- /dev/null
+++ debuginfo-tests/dexter-tests/namespace.cpp
@@ -0,0 +1,23 @@
+// Purpose:
+// Ensure that the debug information for a global variable includes
+// namespace information.
+
+// UNSUPPORTED: system-windows
+
+// RUN: %dexter --fail-lt 1.0 -w \
+// RUN: --builder 'clang' --debugger 'lldb' \
+// RUN: --cflags "-g -O0" -v -- %s
+
+#include <stdio.h>
+
+namespace monkey {
+const int ape = 32;
+}
+
+int main() {
+ printf("hello %d\n", monkey::ape); // DexLabel('main')
+ return 0;
+}
+
+// DexExpectWatchValue('monkey::ape', 32, on_line='main')
+
Index: debuginfo-tests/dexter-tests/deferred_globals.cpp
===================================================================
--- /dev/null
+++ debuginfo-tests/dexter-tests/deferred_globals.cpp
@@ -0,0 +1,28 @@
+// Purpose:
+// Ensure that debug information for a local variable does not hide
+// a global definition that has the same name.
+
+// UNSUPPORTED: system-windows
+
+// RUN: %dexter --fail-lt 1.0 -w \
+// RUN: --builder 'clang' --debugger 'lldb' \
+// RUN: --cflags "-g -O0" -v -- %s
+
+const int d = 100;
+
+extern int foo();
+
+int main() {
+ const int d = 4;
+ const float e = 4; // DexLabel("main")
+ const char *f = "Woopy";
+ return d + foo();
+}
+
+int foo() {
+ return d; // DexLabel("foo")
+}
+
+// DexExpectWatchValue('d', '4', on_line='main')
+// DexExpectWatchValue('d', '100', on_line='foo')
+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89462.301278.patch
Type: text/x-patch
Size: 1520 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201028/3b417aac/attachment.bin>
More information about the llvm-commits
mailing list