[Lldb-commits] [lldb] [lldb-dap] Add feature to remember last non-empty expression. (PR #107485)

Walter Erquinigo via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 12 11:28:28 PDT 2024


================
@@ -191,6 +198,14 @@ def run_test_evaluate_expressions(
         self.continue_to_next_stop()
         self.assertEvaluate("my_bool_vec", "size=2")
 
+        # Test memory read, especially with 'empty' repeat commands.
+        if context == "repl":
+          self.continue_to_next_stop()
+          self.assertEvaluate("memory read &my_ints",
+                              ".*00 00 00 00 02 00 00 00 04 00 00 00 06 00 00 00.*\n.*08 00 00 00 0a 00 00 00 0c 00 00 00 0e 00 00 00.*\n")
+          self.assertEvaluate("",
+                              ".*10 00 00 00 12 00 00 00 14 00 00 00 16 00 00 00.*\n.*18 00 00 00 1a 00 00 00 1c 00 00 00.*\n")
----------------
walter-erquinigo wrote:

I don't think that this will reliably be the same across systems. Something that would be better would be to read from an `uint8_t` array and just read one byte at a time. That should work anywhere.

https://github.com/llvm/llvm-project/pull/107485


More information about the lldb-commits mailing list