This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG0283abee5c87: [lldb] Fix gnu_libstdcpp's update methods
(authored by wallace).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103209/new/
https://reviews.llvm.org/D103209
Files:
lldb/examples/synthetic/gnu_libstdcpp.py
lldb/test/API/tools/lldb-vscode/evaluate/TestVSCode_evaluate.py
lldb/test/API/tools/lldb-vscode/evaluate/main.cpp
Index: lldb/test/API/tools/lldb-vscode/evaluate/main.cpp
===================================================================
--- lldb/test/API/tools/lldb-vscode/evaluate/main.cpp
+++ lldb/test/API/tools/lldb-vscode/evaluate/main.cpp
@@ -1,5 +1,8 @@
#include "foo.h"
+#include <vector>
+#include <map>
+
static int static_int = 42;
int non_static_int = 43;
@@ -25,5 +28,21 @@
}
a_function(var3);
foo_func();
+
+ std::vector<int> my_vec;
+ my_vec.push_back(1);
+ my_vec.push_back(2);
+ my_vec.push_back(3); // breakpoint 4
+
+ std::map<int, int> my_map;
+ my_map[1] = 2;
+ my_map[2] = 3;
+ my_map[3] = 4; // breakpoint 5
+
+ std::vector<bool> my_bool_vec;
+ my_bool_vec.push_back(true);
+ my_bool_vec.push_back(false); // breakpoint 6
+ my_bool_vec.push_back(true); // breakpoint 7
+
return 0;
}
Index: lldb/test/API/tools/lldb-vscode/evaluate/TestVSCode_evaluate.py
===================================================================
--- lldb/test/API/tools/lldb-vscode/evaluate/TestVSCode_evaluate.py
+++ lldb/test/API/tools/lldb-vscode/evaluate/TestVSCode_evaluate.py
@@ -39,7 +39,11 @@
[
line_number(source, "// breakpoint 1"),
line_number(source, "// breakpoint 2"),
- line_number(source, "// breakpoint 3")
+ line_number(source, "// breakpoint 3"),
+ line_number(source, "// breakpoint 4"),
+ line_number(source, "// breakpoint 5"),
+ line_number(source, "// breakpoint 6"),
+ line_number(source, "// breakpoint 7"),
]
)
self.continue_to_next_stop()
@@ -132,6 +136,20 @@
self.assertEvaluateFailure("foo_func")
self.assertEvaluateFailure("foo_var")
+ # Now we check that values are updated after stepping
+ self.continue_to_next_stop()
+ self.assertEvaluate("my_vec", "size=2")
+ self.continue_to_next_stop()
+ self.assertEvaluate("my_vec", "size=3")
+
+ self.assertEvaluate("my_map", "size=2")
+ self.continue_to_next_stop()
+ self.assertEvaluate("my_map", "size=3")
+
+ self.assertEvaluate("my_bool_vec", "size=1")
+ self.continue_to_next_stop()
+ self.assertEvaluate("my_bool_vec", "size=2")
+
@skipIfWindows
@skipIfRemote
def test_generic_evaluate_expressions(self):
Index: lldb/examples/synthetic/gnu_libstdcpp.py
===================================================================
--- lldb/examples/synthetic/gnu_libstdcpp.py
+++ lldb/examples/synthetic/gnu_libstdcpp.py
@@ -148,6 +148,7 @@
self.data_size = self.data_type.GetByteSize()
except:
pass
+ return False
def has_children(self):
return True
@@ -235,7 +236,7 @@
self.count = 0
except:
pass
- return True
+ return False
class StdVBoolImplementation(object):
@@ -282,7 +283,7 @@
self.valid = True
except:
self.valid = False
- return True
+ return False
def __init__(self, valobj, dict):
logger = lldb.formatters.Logger.Logger()
@@ -378,6 +379,7 @@
self.skip_size = self.Mheader.GetType().GetByteSize()
except:
pass
+ return False
def num_children(self):
logger = lldb.formatters.Logger.Logger()
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits