[lldb] Do not deallocate memory after exec
authorAlex Langford <alangford@apple.com>
Fri, 16 Dec 2022 22:29:11 +0000 (14:29 -0800)
committerAlex Langford <alangford@apple.com>
Wed, 11 Jan 2023 20:33:41 +0000 (12:33 -0800)
commitf2f3b1a87ad294433986683864f75575c3a81779
treeecee38ebc332d7305de54c08fbe527051b4bdfe4
parentcf14ef983a49e47ac49e1a9f64cf0849c8b664bc
[lldb] Do not deallocate memory after exec

After an exec has occured, resources used to manage the state of a
Process are cleaned up. One such resource is the AllocatedMemoryCache
which keeps track of memory allocations made in the process for things
like expression evaluation. After an exec is performed, the allocated
memory regions in the process are gone, so it does not make sense to try
to deallocate those regions.

rdar://103188106

Differential Revision: https://reviews.llvm.org/D140249
lldb/include/lldb/Target/Memory.h
lldb/source/Target/Memory.cpp
lldb/source/Target/Process.cpp