diff options
| author | 2020-08-03 14:33:06 +0000 | |
|---|---|---|
| committer | 2020-08-03 14:33:06 +0000 | |
| commit | 061da546b983eb767bad15e67af1174fb0bcf31c (patch) | |
| tree | 83c78b820819d70aa40c36d90447978b300078c5 /gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/offsetof | |
| parent | Import LLVM 10.0.0 release including clang, lld and lldb. (diff) | |
| download | wireguard-openbsd-061da546b983eb767bad15e67af1174fb0bcf31c.tar.xz wireguard-openbsd-061da546b983eb767bad15e67af1174fb0bcf31c.zip | |
Import LLVM 10.0.0 release including clang, lld and lldb.
ok hackroom
tested by plenty
Diffstat (limited to 'gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/offsetof')
| -rw-r--r-- | gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/offsetof/TestOffsetof.py | 4 | ||||
| -rw-r--r-- | gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/offsetof/main.c | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/offsetof/TestOffsetof.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/offsetof/TestOffsetof.py new file mode 100644 index 00000000000..cdfbaae0ce3 --- /dev/null +++ b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/offsetof/TestOffsetof.py @@ -0,0 +1,4 @@ +from lldbsuite.test import lldbinline +from lldbsuite.test import decorators + +lldbinline.MakeInlineTest(__file__, globals(), [decorators.no_debug_info_test]) diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/offsetof/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/offsetof/main.c new file mode 100644 index 00000000000..cbb4a144418 --- /dev/null +++ b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/offsetof/main.c @@ -0,0 +1,12 @@ +#include <stdint.h> + +struct Foo { + int8_t a; + int16_t b; +}; + +int main (int argc, char const *argv[]) { + struct Foo f; + return f.a; //% self.expect("expr offsetof(Foo, a)", substrs = ['= 0']) + //% self.expect("expr offsetof(Foo, b)", substrs = ['= 2']) +} |
