labath added a comment. In D62501#1531202 <https://reviews.llvm.org/D62501#1531202>, @aadsm wrote:
> > Another advantage of having this in an abstract class is that you could > > test this in isolation, as NativeProcessProtocol is already setup to mock > > memory accesses: > > https://github.com/llvm-mirror/lldb/blob/master/unittests/Host/NativeProcessProtocolTest.cpp. > > I might be missing something here, I'm not sure how having this in a > `NativeProcessELF` class instead of `NativeProcessLinux` would make things > easier for testing. Like you said, `NativeProcessProtocol` is the one set up > to mock memory access. I still need to create my own `MockProcessELF`, which > makes me think if there's a way to somehow reuse `MockProcess` to create > `MockProcessELF`? Yeah, sorry, I guess that came out more optimistic then what I meant. What I was trying to say, that it is possible to create NativeProcessProtocol in a unit test, which means it would be also possible for the NativeProcessELF. I haven't given this much thought, but it may be possible to reuse the stuff in MockProcess by making it a template (so you'd have a MockProcess<NativeProcessProtocol>, and a MockProcess<NativeProcessELF>) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62501/new/ https://reviews.llvm.org/D62501 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits