summaryrefslogtreecommitdiffstats
path: root/lldb/test/Shell/SymbolFile/DWARF/Inputs
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/test/Shell/SymbolFile/DWARF/Inputs')
-rw-r--r--lldb/test/Shell/SymbolFile/DWARF/Inputs/debug-line-basic.script14
-rw-r--r--lldb/test/Shell/SymbolFile/DWARF/Inputs/debug-types-basic.cpp15
-rw-r--r--lldb/test/Shell/SymbolFile/DWARF/Inputs/debug-types-expressions.cpp33
-rw-r--r--lldb/test/Shell/SymbolFile/DWARF/Inputs/dir-separator-no-comp-dir-relative-name.lldbinit3
-rw-r--r--lldb/test/Shell/SymbolFile/DWARF/Inputs/dir-separator-posix.lldbinit3
-rw-r--r--lldb/test/Shell/SymbolFile/DWARF/Inputs/dir-separator-windows.lldbinit7
-rw-r--r--lldb/test/Shell/SymbolFile/DWARF/Inputs/find-variable-file-2.cpp3
7 files changed, 78 insertions, 0 deletions
diff --git a/lldb/test/Shell/SymbolFile/DWARF/Inputs/debug-line-basic.script b/lldb/test/Shell/SymbolFile/DWARF/Inputs/debug-line-basic.script
new file mode 100644
index 00000000000..7f3a1b9c2ff
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/DWARF/Inputs/debug-line-basic.script
@@ -0,0 +1,14 @@
+PHDRS {
+ text PT_LOAD;
+}
+SECTIONS {
+ .shstrtab : { *(.shstrtab ) }
+ .debug_info : { *(.debug_info ) }
+ .debug_line : { *(.debug_line ) }
+ .debug_str : { *(.debug_str ) }
+ .debug_abbrev : { *(.debug_abbrev) }
+
+ . = 0x201000;
+ .text : { *(.text .text.f) } :text
+ /DISCARD/ : { *(*) }
+}
diff --git a/lldb/test/Shell/SymbolFile/DWARF/Inputs/debug-types-basic.cpp b/lldb/test/Shell/SymbolFile/DWARF/Inputs/debug-types-basic.cpp
new file mode 100644
index 00000000000..defa8ba5c69
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/DWARF/Inputs/debug-types-basic.cpp
@@ -0,0 +1,15 @@
+enum E { e1, e2, e3 };
+enum class EC { e1, e2, e3 };
+
+struct A {
+ int i;
+ long l;
+ float f;
+ double d;
+ E e;
+ EC ec;
+};
+
+extern constexpr A a{42, 47l, 4.2f, 4.7, e1, EC::e3};
+extern constexpr E e(e2);
+extern constexpr EC ec(EC::e2);
diff --git a/lldb/test/Shell/SymbolFile/DWARF/Inputs/debug-types-expressions.cpp b/lldb/test/Shell/SymbolFile/DWARF/Inputs/debug-types-expressions.cpp
new file mode 100644
index 00000000000..fe728cf040d
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/DWARF/Inputs/debug-types-expressions.cpp
@@ -0,0 +1,33 @@
+struct A {
+ int i = 47;
+ int f() { return i; }
+ virtual ~A() = default;
+};
+
+struct B: public A {
+ int j = 42;
+};
+
+namespace ns {
+struct A {
+ int i = 147;
+ ::A getA();
+ A();
+};
+A::A() = default;
+
+::A A::getA() {
+ ::A a;
+ a.i = i - 1;
+ return a;
+}
+
+} // namespace ns
+
+int foo(A *a) {
+ return a->f();
+}
+
+int main() {
+ return foo(new B);
+}
diff --git a/lldb/test/Shell/SymbolFile/DWARF/Inputs/dir-separator-no-comp-dir-relative-name.lldbinit b/lldb/test/Shell/SymbolFile/DWARF/Inputs/dir-separator-no-comp-dir-relative-name.lldbinit
new file mode 100644
index 00000000000..390408ec8cc
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/DWARF/Inputs/dir-separator-no-comp-dir-relative-name.lldbinit
@@ -0,0 +1,3 @@
+image dump line-table a.c
+breakpoint set -f a.c -l 1
+breakpoint set -f foo/b.c -l 1
diff --git a/lldb/test/Shell/SymbolFile/DWARF/Inputs/dir-separator-posix.lldbinit b/lldb/test/Shell/SymbolFile/DWARF/Inputs/dir-separator-posix.lldbinit
new file mode 100644
index 00000000000..73a8a491bb2
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/DWARF/Inputs/dir-separator-posix.lldbinit
@@ -0,0 +1,3 @@
+image dump line-table a.c
+breakpoint set -f a.c -l 1
+breakpoint set -f /tmp/b.c -l 1
diff --git a/lldb/test/Shell/SymbolFile/DWARF/Inputs/dir-separator-windows.lldbinit b/lldb/test/Shell/SymbolFile/DWARF/Inputs/dir-separator-windows.lldbinit
new file mode 100644
index 00000000000..8737aafc8a2
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/DWARF/Inputs/dir-separator-windows.lldbinit
@@ -0,0 +1,7 @@
+image dump line-table a.c
+breakpoint set -f a.c -l 1
+breakpoint set -f C:/tmp/b.c -l 1
+
+# This will fail on non-windows systems because the path will by parsed
+# according to posix rules
+# breakpoint set -f 'C:\tmp\b.c' -l 1
diff --git a/lldb/test/Shell/SymbolFile/DWARF/Inputs/find-variable-file-2.cpp b/lldb/test/Shell/SymbolFile/DWARF/Inputs/find-variable-file-2.cpp
new file mode 100644
index 00000000000..cd02cb07c62
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/DWARF/Inputs/find-variable-file-2.cpp
@@ -0,0 +1,3 @@
+namespace two {
+int foo;
+}
OpenPOWER on IntegriCloud