Index: lldb/bindings/macros.swig =================================================================== --- lldb/bindings/macros.swig +++ 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 Index: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/deque/Makefile =================================================================== --- /dev/null +++ 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 Index: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/deque/TestDataFormatterLibcxxDeque.py =================================================================== --- /dev/null +++ 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") + ]) Index: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/deque/main.cpp =================================================================== --- /dev/null +++ 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 +}