diff --git a/lldb/bindings/macros.swig b/lldb/bindings/macros.swig --- a/lldb/bindings/macros.swig +++ b/lldb/bindings/macros.swig @@ -1,6 +1,5 @@ %define STRING_EXTENSION_LEVEL(Class, Level) %extend { - %nothreadallow; std::string lldb:: ## Class ## ::__str__(){ lldb::SBStream stream; $self->GetDescription (stream, Level); @@ -11,13 +10,11 @@ } return std::string(desc, desc_len); } - %clearnothreadallow; } %enddef %define STRING_EXTENSION(Class) %extend { - %nothreadallow; std::string lldb:: ## Class ## ::__str__(){ lldb::SBStream stream; $self->GetDescription (stream); @@ -28,6 +25,5 @@ } return std::string(desc, desc_len); } - %clearnothreadallow; } %enddef diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/deque/Makefile b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/deque/Makefile new file mode 100644 --- /dev/null +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/deque/Makefile @@ -0,0 +1,5 @@ +CXX_SOURCES := main.cpp + +USE_LIBCPP := 1 + +include Makefile.rules diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/deque/TestDataFormatterLibcxxDeque.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/deque/TestDataFormatterLibcxxDeque.py new file mode 100644 --- /dev/null +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/deque/TestDataFormatterLibcxxDeque.py @@ -0,0 +1,25 @@ +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class LibcxxDequeDataFormatterTestCase(TestBase): + + mydir = TestBase.compute_mydir(__file__) + + @add_test_categories(["libc++"]) + def test(self): + self.build() + lldbutil.run_to_source_breakpoint(self, "break here", + lldb.SBFileSpec("main.cpp")) + + self.expect_expr("empty", result_children=[]) + self.expect_expr("deque_1", result_children=[ + ValueCheck(name="[0]", value="1"), + ]) + self.expect_expr("deque_3", result_children=[ + ValueCheck(name="[0]", value="3"), + ValueCheck(name="[1]", value="1"), + ValueCheck(name="[2]", value="2") + ]) diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/deque/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/deque/main.cpp new file mode 100644 --- /dev/null +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/deque/main.cpp @@ -0,0 +1,8 @@ +#include + +int main() { + std::deque empty; + std::deque deque_1 = {1}; + std::deque deque_3 = {3, 1, 2}; + return empty.size() + deque_1.front() + deque_3.front(); // break here +}