[lldb] Incl SC UUID in headerbytes cache for old debugservers (#248667)
I added a new caching for lldb for binaries read out of memory, saving
the binary header bytes, in
https://github.com/llvm/llvm-project/pull/231344
It creates a filename for the headerbytes cache based on the filename,
file UUID, and if the binary is inside the Darwin shared cache region,
the shared cache UUID. If the debugserver doesn't report the shared
cache VM range, it would suppress headerbytes caching.
One CI bot was using an older debugserver that did not provide the
shared cache VM region, and the test would fail because the expected
headerbytes file was not found.
This changes the behavior for an old debugserver that fails to report
the shared cache VM region bounds -- now, we will include the shared
cache UUID for the filename of every binary read out of memory on that
system, when caching the headerbytes. This means that a filename which
was previously a.out-<UUID>-headerbytes will not be
a.out-<UUID>-sharedcache-<UUID>-headerbytes. If a software update is
applied to the system (so a new shared cache UUID is generated), this
a.out will have a headerbytes cache for both the old shared cache and
the new shared cache, unnecessarily, but the DataFileCache default
expiration policy will remove the old one after seven days of not being
referenced.
I could have changed the test to skip-if-out-of-tree-debugserver, but
any Xcode from the last year-ish includes this data from debugserver, so
that would suppress the test run more than I'd like.
assisted-by: claude
rdar://194207163