Commit Graph

3 Commits

Author SHA1 Message Date
Alastair Houghton
9aac812dc7 [Backtracing] Fix a few niggles.
It turns out that .copyBytes() checks that the source doesn't provide more
bytes than the destination will accept.

rdar://117681625
2023-11-03 14:36:22 +00:00
Alastair Houghton
d0b788abff [Backtracing] Add a precondition to protect against problems in future.
Because the cache uses the page addresses as its keys, we should have
a precondition to check that we haven't passed an address within a page.
The latter would result in confusing behaviour so it's worth diagnosing
up front.

rdar://117681625
2023-11-03 14:36:22 +00:00
Alastair Houghton
1fc2ca35e8 [Backtracing] Add a caching wrapper for MemoryReader.
Currently we read many small chunks from the process we're backtracing.
If it so happens that it's the local process, that isn't really a big
problem, but if it's a remote process, especially on Linux where we have
to use the memory server, it's probably a little slow.

Fix by adding a caching layer.

rdar://117681625
2023-11-03 14:36:19 +00:00