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
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to