[all-commits] [llvm/llvm-project] 20f842: [lldb] Fix GetRemoteSharedModule fallback logic

Joseph Tremoulet via All-commits all-commits at lists.llvm.org
Wed Sep 23 06:01:32 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 20f84257ac4ac54ceb5f581a6081fac6eff2a5a1
      https://github.com/llvm/llvm-project/commit/20f84257ac4ac54ceb5f581a6081fac6eff2a5a1
  Author: Joseph Tremoulet <jotrem at microsoft.com>
  Date:   2020-09-23 (Wed, 23 Sep 2020)

  Changed paths:
    M lldb/source/Target/Platform.cpp
    M lldb/test/API/functionalities/postmortem/minidump-new/TestMiniDumpNew.py

  Log Message:
  -----------
  [lldb] Fix GetRemoteSharedModule fallback logic

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.

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D88099




More information about the All-commits mailing list