[Lldb-commits] [lldb] [lldb-dap] Add ContinueRequestHandler unit test (PR #140566)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Mon May 19 23:03:39 PDT 2025


labath wrote:

gmock doesn't let you do anything that wouldn't be possible without it. For this to work, the code which interacts with the mock needs to be ready to accept something other than the real object.... somehow. That usually means making the mocked object polymorphic, but that is a nonstarter here due to the interface stability. Other options I see are:
- write a wrapper around SBProcess and then mock that
- make everything a template so that it can be instantiated with a different (mock) implementation
- use the fact that liblldb is a (shared) library to write an "alternative implementation" of that library

Each of those options comes with a fairly high cost (both upfront and in ongoing maintenance)...

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


More information about the lldb-commits mailing list