aleksandr.urakov added a comment. In D53753#1504589 <https://reviews.llvm.org/D53753#1504589>, @labath wrote:
> When we evaluate an expression, we jit a bunch of opcodes into the inferior > memory and then have it execute them. For that to work, we need to allocate > some memory in order to store the opcodes. We cannot use the general > expression engine to jit that expression, as we would be back to square one, > so we manually set the PC to the entry point of the mmap function, and set > the argument values as if it was being called. Then we just let the inferior > loose and have it allocate the memory for us and return it. For this to > work, we need abi knowledge both to correctly set the arguments of mmap, and > to retrieve its result. Got it, thanks! There's a different approach on Windows: for now we just call `VirtualAllocEx`, which can allocate memory in another process. But it will not work for the remote debugging case. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53753/new/ https://reviews.llvm.org/D53753 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits