[Lldb-commits] [lldb] [lldb] Support reading DW_OP_piece from file address (PR #94026)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 3 01:49:26 PDT 2024


================
@@ -768,3 +768,63 @@ TEST(DWARFExpression, ExtensionsDWO) {
 
   testExpressionVendorExtensions(dwo_module_sp, *dwo_dwarf_unit);
 }
+
+TEST_F(DWARFExpressionMockProcessTest, DW_OP_piece_file_addr) {
+  struct MockTarget : Target {
----------------
labath wrote:

You could consider using gmock with [this kind](https://github.com/llvm/llvm-project/blob/main/lldb/unittests/TestingSupport/Host/NativeProcessTestUtils.h#L73) of a pattern that would enable you to write `EXPECT_CALL(target, ReadMemory(0x40, 1)).WillOnce(Return(ByMove(std::vector<uint8_t>{0x11})));`

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


More information about the lldb-commits mailing list