Skip to content

Conversation

@tmat
Copy link
Member

@tmat tmat commented Sep 27, 2021

Uses new SymReader API to write compiler version info to Windows PDB.
No op if the SymReader does not implement the API.

The new API will be added to Microsoft.DiaSymReader.Native.*.dll (not available yet). On .NET Core the library is loaded from the CLR runtime so this will require the runtime to be updated first before we can test on Core.

Similar change in Crossgen: dotnet/runtime#59686

The compiler emits the following Windows PDB S_COMPILE3 record:

** Module: "* CompilerInfo *" from "86F52079"


(000004) S_COMPILE3:
         Language: MSIL
         Target processor: Pentium III
         Compiled for edit and continue: no
         Compiled without debugging info: no
         Compiled with LTCG: no
         Compiled with /bzalign: no
         Managed code present: no
         Compiled with /GS: no
         Compiled with /hotpatch: no
         Converted by CVTCIL: no
         MSIL module: no
         Compiled with /sdl: no
         Compiled with pgo: no
         .EXP module: no
         Pad bits = 0x0000
         Frontend Version: Major = 0, Minor = 0, Build = 0, QFE = 0
         Backend Version: Major = 42, Minor = 42, Build = 42, QFE = 42424
         Version string: C# - 4.0.0-dev

@tmat tmat requested a review from a team as a code owner September 27, 2021 16:05
@ghost ghost added the Area-Compilers label Sep 27, 2021
@tmat
Copy link
Member Author

tmat commented Sep 27, 2021

@jaredpar

@jcouv
Copy link
Member

jcouv commented Sep 27, 2021

Probably needs some test

@tmat
Copy link
Member Author

tmat commented Sep 27, 2021

Probably needs some test

Definitely, but can't really test until Microsoft.DiaSymReader.Native.*.dll is available.

@jcouv
Copy link
Member

jcouv commented Sep 27, 2021

When will it be available?

@davidwrighton
Copy link
Member

@tmat did you intend to say on .NET Framework it depends on the globally installed version, or is it really the case that the .NET Core version depends on the full framework copy of diasymreader?

@tmat
Copy link
Member Author

tmat commented Sep 28, 2021

@tmat did you intend to say on .NET Framework it depends on the globally installed version, or is it really the case that the .NET Core version depends on the full framework copy of diasymreader?

No, nothing depends on globally installed version.
We ship it with the compiler, but on .NET Core the runtime also ships it and it's loaded from there.

Copy link
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thanks (iteration 5). From discussion with Jared I understand this is time sensitive and was tested manually. Please open a follow-up issue to add tests once the package is available.

@jcouv jcouv self-assigned this Sep 28, 2021
@jcouv jcouv added this to the 17.0 milestone Sep 29, 2021
@jcouv
Copy link
Member

jcouv commented Sep 29, 2021

Don't forget to retarget this PR to the 17.0 branch as needed.

@tmat tmat force-pushed the WinPDBCompilerVersion branch from 3141981 to 93fbdfb Compare September 29, 2021 21:09
@tmat tmat changed the base branch from main to release/dev17.0 September 29, 2021 21:09
@tmat tmat requested review from a team as code owners September 29, 2021 21:09
@tmat tmat requested a review from a team September 29, 2021 21:09
@tmat tmat force-pushed the WinPDBCompilerVersion branch from 93fbdfb to 8a5300d Compare September 29, 2021 21:11
@tmat tmat merged commit e40f3f8 into dotnet:release/dev17.0 Oct 1, 2021
@tmat tmat deleted the WinPDBCompilerVersion branch October 1, 2021 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants