================
@@ -132,34 +134,33 @@ TEST_F(SymbolFileDWARFTests, 
ParseArangesWithMultipleTerminators) {
   // Set the big endian length correctly.
   const offset_t binary_data_size = sizeof(binary_data);
   binary_data[3] = (uint8_t)binary_data_size - 4;
-  DWARFDataExtractor data;
-  data.SetData(static_cast<const void *>(binary_data), sizeof binary_data,
-               lldb::ByteOrder::eByteOrderBig);
+  llvm::DWARFDataExtractor data(llvm::ArrayRef(binary_data),
+                                /*isLittleEndian=*/false, /*AddrSize=*/4);
   DWARFDebugArangeSet set;
   offset_t off = 0;
   llvm::Error error = set.extract(data, &off);
   // Multiple terminators are not fatal as they do appear in binaries.
   EXPECT_FALSE(bool(error));
   // Parser should read all terminators to the end of the length specified.
   EXPECT_EQ(off, binary_data_size);
-  ASSERT_EQ(set.NumDescriptors(), 2U);
-  ASSERT_EQ(set.GetDescriptorRef(0).address, (dw_addr_t)0x1000);
-  ASSERT_EQ(set.GetDescriptorRef(0).length, (dw_addr_t)0x100);
-  ASSERT_EQ(set.GetDescriptorRef(1).address, (dw_addr_t)0x2000);
-  ASSERT_EQ(set.GetDescriptorRef(1).length, (dw_addr_t)0x10);
+  ASSERT_EQ(set.getDescriptorsSize(), 4U);
----------------
ZequanWu wrote:

After checking 
https://github.com/llvm/llvm-project/blob/main/llvm/unittests/DebugInfo/DWARF/DWARFDebugArangeSetTest.cpp,
 I found it already covers those tests used here.

https://github.com/llvm/llvm-project/pull/110058
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to