jasonmolenda wrote:

Looks good to me, using decltype instead of hand-writing all the function 
prototypes for casts is nice.  The slightly larger change I would suggest is 
that in the `SharedCacheInfo::SharedCacheInfo` ctor, we scan the list of 
binaries present in the shared cache that lldb itself is using.  We try
1. Scan the on-disk shared cache blob directly, using dyld framework SPI to 
find all the files available.
2. Call `CreateSharedCacheInfoWithInstrospectionSPIs()` to find the binaries 
available in lldb's own address space, if and only if lldb was compiled against 
an internal SDK that provides the `<mach-o/dyld_introspection.h>` header.
3. Call `CreateSharedCacheInfoLLDBsVirtualMemory()`, which does the same thing 
as (2), with slightly different SPI and doesn't require an internal header.

(2) and (3) are different API for accomplishing the same thing, and which one 
was used depended on what SDK lldb was compiled against.  I don't know if (2) 
offers some advantages over (3), but the llvm.org main lldb always uses (3). It 
was a poor choice, to have two different codepaths that do the same thing 
slightly differently, and which one you use depends on how your lldb was 
compiled.  One of them should be removed.  I don't care which.

I don't know if you want to tackle that at the same time, but you've removed 
the "must have an internal header" for (2), so now (3) will never be reached, I 
believe.

https://github.com/llvm/llvm-project/pull/205434
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to