Page MenuHomePhabricator

[lldb] Fix GetRemoteSharedModule fallback logic
ClosedPublic

Authored by JosephTremoulet on Sep 22 2020, 7:27 AM.

Details

Summary

When the various methods of locating the module in GetRemoteSharedModule
fail, make sure we pass the original module spec to the bail-out call to
the provided resolver function.

Also make sure we consistently use the resolved module spec from the
various success paths.

Thanks to what appears to have been an accidentally inverted condition
(commit 85967fa applied the new condition to a path where GetModuleSpec
returns false, but should have applied it when GetModuleSpec returns
true), without this fix we only pass the original module spec in the
fallback if the original spec has no uuid (or has a uuid that somehow
matches the resolved module's uuid despite the call to GetModuleSpec
failing). This manifested as a bug when processing a minidump file with
a user-provided sysroot, since in that case the resolver call was being
applied to resolved_module_spec (despite resolution failing), which did
not have the path of its file_spec set.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald Transcript
JosephTremoulet requested review of this revision.Sep 22 2020, 7:27 AM
This revision is now accepted and ready to land.Sep 22 2020, 8:43 AM
This revision was landed with ongoing or failed builds.Sep 23 2020, 6:01 AM
This revision was automatically updated to reflect the committed changes.