clayborg wrote:

> > I forgot to ask, what is the motivation behind this change? Is there 
> > something you can't do with the SBAPI right now or that is better expressed 
> > with SBAddressRange and SBAddressRangeList?
> 
> Yes, I want to add the following API:
> 
> lldb::SBError SBProcess::FindInMemory(const SBAddressRangeList &ranges, const 
> void *buf, uint64_t size, SBAddressRangeList &matches, size_t alignment);

Yeah, we have no `SBProcess::FindMemory()` API, but we do have a "memory find" 
command. We want to expose simple memory finds, and complex ones like above:
```
addr_t SBProcess::FindInMemory(SBAddressRange &range, const void *buf, uint64_t 
size, size_t alignment);
SBError SBProcess::FindInMemory(const SBAddressRangeList &ranges, const void 
*buf, uint64_t size, SBAddressRangeList &matches, size_t alignment);
```
We then want to plumb this through to the lldb_private::Process plug-ins so we 
can allow plug-ins to do things more efficiently. Mostly for core files where 
we could parallelize the memory search. 



https://github.com/llvm/llvm-project/pull/92014
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to