jasonmolenda wrote:

I don't think this change is correct, or I don't understand what it is trying 
to do.

When we're connected to a stub that can allocate memory in the target, none of 
this code is executed.  So lldb-server/debugserver will not hit this.

We send `qMemoryRegionInfo` packets to look for a block of memory that is 
unallocated, or has permissions no-read+no-write+no-execute.  The memory region 
scan starts at address 0 and moves up by the size of each memory region, 
looking for `size` bytes between allocated memory regions, and returns that 
address if it is found.

So I'm guessing we have (1) a target that cannot allocate memory, (2) a target 
that supported `qMemoryRegionInfo`, a non-accessible block of memory at address 
0? (did I read this right?) and in that case, we end up picking address 0 as 
our host-side virtual address+memory buffer for expression data storage.

Can you show what your `qMemoryRegionInfo` results are for address 0 on this 
target, so I can confirm I didn't misread/misunderstand the situation here?

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

Reply via email to