The text bytes are only used by macOS "Compact Unwind Info"-guided unwinding. Before #11, we were computing offset_from_base in that code based on the text segment/section start SVMA and the base SVMA. In #11 this code was changed to use the file range, but this is actually incorrect; file offsets are not always equivalent to relative-to-base addresses, for example in the dyld shared cache. Furthermore, in samply's case, we're getting these bytes straight from the other process's memory, so we're not interested in any information about the file anyway.
This PR changes things back to deal in terms of SVMAs.
The text bytes are only used by macOS "Compact Unwind Info"-guided unwinding. Before #11, we were computing
offset_from_base
in that code based on the text segment/section start SVMA and the base SVMA. In #11 this code was changed to use the file range, but this is actually incorrect; file offsets are not always equivalent to relative-to-base addresses, for example in the dyld shared cache. Furthermore, in samply's case, we're getting these bytes straight from the other process's memory, so we're not interested in any information about the file anyway.This PR changes things back to deal in terms of SVMAs.
r? @afranchuk