[Lldb-commits] [PATCH] D30454: [LLDB][MIPS] Fix typo in MatchesModuleSpec()

Nitesh Jain via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 2 02:40:22 PST 2017


nitesh.jain added a comment.

The issue was observed while parsing "vdso module" for the core file. When the DynamicLoader::LoadModuleAtAddress is called to load "vdso" module. Since "vdso" doesn't match with any of the module in the target.GetImages(), the check_alternative_file_name becomes true. This cause MatchesModuleSpec to return true and application binary to reload again at vdso base address(AT_SYSINFO_EHDR) thus all load addresses of application elf's sections becomes incorrect. Please find attach log file.
DynamicLoader::LoadModuleAtAddress(...)
{

  ...
  ...
  ...
  if (check_alternative_file_name) {
          ...
          ...
          ...
          **FileSpec(memory_info.GetName().AsCString(), false),**  ** // memory_info.GetName().AsCString() is empty here**
          target.GetArchitecture());
  
      if ((module_sp = modules.FindFirstModule(new_module_spec))) {  // FindFirstModule returns application elf's module
        UpdateLoadedSections(module_sp, link_map_addr, base_addr, false); // load addresses of application elf's sections gets updated to vdso's address (which is incorrect)
        return module_sp;
      }

...
 ...
 ...
}


https://reviews.llvm.org/D30454





More information about the lldb-commits mailing list