Fix: do not resolve debug info on build id mismatch #101
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
Babeltrace is showing erroneous debugging information when a trace is
read on a system that has a different version of the binary that of the
binary recording in trace.
This is due to the fact that Babeltrace currently does not confirm that
the binary(or debuglink) before resolving the debugging information.
The build ids in the trace and in the local binary must be the same to
ensure that instruction pointer addresses can be decoded.
Solution
Now when setting the build id, confirm that the trace build id and the
binary build id match. Once the match is confirmed, set the
file_build_id_matches
field in the corresponding thebin_info
structure. This way when decoding the events, we can quickly check if
the debugging information is available for that binary.
Drawback
None.