From 061da546b983eb767bad15e67af1174fb0bcf31c Mon Sep 17 00:00:00 2001 From: patrick Date: Mon, 3 Aug 2020 14:33:06 +0000 Subject: Import LLVM 10.0.0 release including clang, lld and lldb. ok hackroom tested by plenty --- .../test/python_api/get-value-32bit-int/Makefile | 3 +++ .../get-value-32bit-int/TestGetValue32BitInt.py | 19 +++++++++++++++++++ .../test/python_api/get-value-32bit-int/main.cpp | 5 +++++ 3 files changed, 27 insertions(+) create mode 100644 gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int/Makefile create mode 100644 gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int/TestGetValue32BitInt.py create mode 100644 gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int/main.cpp (limited to 'gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int') diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int/Makefile new file mode 100644 index 00000000000..99998b20bcb --- /dev/null +++ b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int/Makefile @@ -0,0 +1,3 @@ +CXX_SOURCES := main.cpp + +include Makefile.rules diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int/TestGetValue32BitInt.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int/TestGetValue32BitInt.py new file mode 100644 index 00000000000..025226471bd --- /dev/null +++ b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int/TestGetValue32BitInt.py @@ -0,0 +1,19 @@ +""" +Check that SBValue.GetValueAsSigned() does the right thing for a 32-bit -1. +""" + +import lldb +from lldbsuite.test.lldbtest import * +import lldbsuite.test.lldbutil as lldbutil + +class TestCase(TestBase): + + mydir = TestBase.compute_mydir(__file__) + NO_DEBUG_INFO_TESTCASE = True + + def test_with_run_command(self): + self.build() + lldbutil.run_to_source_breakpoint(self,"// break here", lldb.SBFileSpec("main.cpp")) + + self.assertEqual(self.frame().FindVariable("myvar").GetValueAsSigned(), -1) + self.assertEqual(self.frame().FindVariable("myvar").GetValueAsUnsigned(), 0xFFFFFFFF) diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int/main.cpp new file mode 100644 index 00000000000..61f40fb2a78 --- /dev/null +++ b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int/main.cpp @@ -0,0 +1,5 @@ +#include +int main () { + int32_t myvar = -1; + return myvar; // break here +} -- cgit v1.2.3-59-g8ed1b