brave编译打包时dump_syms报错Couldn’t locate EXE or DLL file

brave编译打包时dump_syms报错Couldn’t locate EXE or DLL file

原因:brave.exe.exe类似的文件名无效导致无法识别到文件
代码位置:
src\third_party\breakpad\breakpad\src\common\windows\pdb_source_line_writer.cc

    // Look for an EXE or DLL file.
    const wchar_t* extensions[] = { L"exe", L"dll" };
    for (size_t i = 0; i < sizeof(extensions) / sizeof(extensions[0]); i++) {
      size_t dot_pos = file.find_last_of(L".");
      if (dot_pos != wstring::npos) {
        file.replace(dot_pos + 1, wstring::npos, extensions[i]);
        // Check if this file exists.
        if (GetFileAttributesW(file.c_str()) != INVALID_FILE_ATTRIBUTES) {
          code_file_ = file;
          return true;
        }
      }
    }

解决方法:

const wchar_t* extensions[] = { L"exe", L"dll" };
替换成
const wchar_t* extensions[] = { L"exe", L"dll", L"" };
上一篇
下一篇