[Lldb-commits] [lldb] [lldb] Add array decaying (PR #210918)
Georgiy Samoylov via lldb-commits
lldb-commits at lists.llvm.org
Wed Jul 22 01:46:37 PDT 2026
================
@@ -144,6 +144,42 @@ def test_memory_read(self):
self.assertEqual(len(o), expected_object_length)
self.assertEqual(len(objects_read), 4)
+ def test_memory_read_array_name_decays_to_address(self):
+ """An array expression decays to a pointer to its first element, so
+ `memory read <array>` and `memory read `<array>`` must behave like
+ `memory read &<array>`, rather than failing or reading a bogus address."""
+ self.build_run_stop()
+
+ fmt = "memory read --format uint32_t[] --size 4 --count 3 "
+
+ def read_addr_and_values(suffix):
+ self.runCmd(fmt + suffix)
----------------
sga-sc wrote:
Done
https://github.com/llvm/llvm-project/pull/210918
More information about the lldb-commits
mailing list