Open Bug 1400354 Opened 2 years ago Updated 2 years ago

Put pdbstr.exe in tooltool for Windows builds


(Firefox Build System :: General, enhancement)

Not set


(firefox57 wontfix)

Tracking Status
firefox57 --- wontfix


(Reporter: ted, Unassigned)



(4 files)

We use pdbstr.exe during symbol dumping to put a source server stream into our PDB files. It comes with the Debugging Tools for Windows, which has sometimes been rolled into the Windows SDK.

I think it's pretty standalone, so we should just stick it into tooltool and fetch it from there.
Comment on attachment 8908934 [details]
Bug 1400354 - Fix JarWriter usage;
Attachment #8908934 - Flags: review?(ted) → review+
Comment on attachment 8908935 [details]
Bug 1400354 - Include pdbstr.exe in toolchain archive;

::: build/
(Diff revision 1)
>      {
>          'pattern': 'bin/x64/**',
>      },
>      {
> +        'pattern': 'Debuggers/x64/srcsrv/**',

We probably don't really need anything else here, tbh.
Attachment #8908935 - Flags: review?(ted) → review+
Comment on attachment 8908936 [details]
Bug 1400354 - Upgrade Visual Studio 2015 toolchain;
Attachment #8908936 - Flags: review?(ted) → review+
Comment on attachment 8908937 [details]
Bug 1400354 - Use pdbstr from toolchain archive

::: toolkit/crashreporter/tools/
(Diff revision 1)
>          stream_output_path = os.path.abspath(streamFilename)
>          # Call SourceIndex to create the .stream file
>          result = SourceIndex(sourceFileStream, stream_output_path, vcs_root)
>          if self.copy_debug:
> -            pdbstr_path = os.environ.get("PDBSTR_PATH")
> -            pdbstr = os.path.normpath(pdbstr_path)
> +            subprocess.check_call(
> +                ["pdbstr.exe", "-w", "-p:" + os.path.basename(debug_file),

Unfortunately this will fail for local developer builds that haven't munged `PATH` appropriately. You might need to add a check to moz.configure to locate pdbstr.exe and then you could check `if buildconfig.substs['PDBSTR']` here.

If you do that, you should make the configure check fail if `MOZ_AUTOMATION` is set and pdbstr is not found, so that we don't accidentally break source server indexing in automation.

It's OK to not have pdbstr for local builds, since all we use it for is inserting source server indexing into the PDB files, which is only really needed in builds that we ship.
Attachment #8908937 - Flags: review-
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.