[Lldb-commits] [lldb] [lldb-dap] Simplify `readMemory` (PR #109485)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Mon Sep 23 00:41:06 PDT 2024
https://github.com/labath approved this pull request.
Thanks for doing this. I'll respond to your [https://github.com/llvm/llvm-project/pull/104317#issuecomment-2364684837] for the other thread here:
> > The method I'd recommend is to call ReadMemory
> I assume I should prefer Target::ReadMemory over Process::readMemory, right?
That would not be a correct assumption. However, I'm also not saying you should *not* use `Target::ReadMemory`. :P
The way I understand it, the main difference between the two functions is that the `Target` function also works before starting a process, and it may returned cached data from disk for running processes (which means it will be faster, but potentially return incorrect data).
You probably don't care about the first point. You may care about the second one, but I don't know how you should come to a decision there. If I was doing this, I'd use `SBProcess` because it's more convenient (it takes an integer instead of SBAddress), and matches what you've been doing already. However, I'm leaving that up to you..
https://github.com/llvm/llvm-project/pull/109485
More information about the lldb-commits
mailing list