DavidSpickett wrote: Yes that's right. I'm still a bit unclear how it makes its way to WritePointerToMemory, but as long as it'll break if we change things, that's the point.
I think it is that: * Expression evaluation needs to pass `void* ptr` to the function. * To do that we allocate a stack slot in the expression wrapper, and write it there - using WritePointerToMemory. * The wrapper loads it back from memory to call the function. Yes, because the wrapper itself has no arguments. So this isn't like a normal compilation where you put the pointer in a register, everything has to be on the stack first. Also stylistic point, use `uintptr_t` for the pointer manipulation. No practical difference in this case, but a bit more self-describing. A new variable name is a good idea too, if you check both in the test, if it does fail, the difference between the 2 will be a big clue to figuring it out. https://github.com/llvm/llvm-project/pull/153585 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits