Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking out of debugging support for .NET5 #1093

Closed
3 tasks
marek-safar opened this issue Apr 14, 2020 · 7 comments
Closed
3 tasks

Linking out of debugging support for .NET5 #1093

marek-safar opened this issue Apr 14, 2020 · 7 comments
Labels
Milestone

Comments

@marek-safar
Copy link
Contributor

marek-safar commented Apr 14, 2020

For .NET5 it would be better to have MSBuild property which controls the debugging support as a complete feature. This would cover the following behavior inside linker.

  • Debug symbols stripping (including embedded PDBs)
  • No special marking of members and types used by the debugger
  • Hook up of hidden features in libraries which keep additional types for debugging

This property could be set automatically when '$(DebugType)'=='none'.

@marek-safar marek-safar added this to the .NET5.0 milestone Apr 14, 2020
@marek-safar
Copy link
Contributor Author

StackFrame tracking at dotnet/runtime#34910

@eerhardt
Copy link
Member

Hook up of hidden features in libraries which keep additional types for debugging

There is a similar story with types that are only necessary for COM. See dotnet/runtime#36659. For both COM and debugging, we are "rooting" specific types in the libraries.

For debugging we have:

We could use the same mechanism to preserve and trim these types based on a "feature switch" that is respected in the descriptor XML files.

@marek-safar
Copy link
Contributor Author

@eerhardt could you please look into annotating the debugger dependencies in libraries with correct feature tag. I also think as part of this job we need to figure out how to move SPC XML descriptor to src/libraries

eerhardt added a commit to eerhardt/runtime that referenced this issue Jul 13, 2020
eerhardt added a commit to dotnet/runtime that referenced this issue Jul 15, 2020
)

* Remove debug only attributes when Debugger.IsSupported is false.

Contributes to dotnet/linker#1093

* Move debug only attributes to shared CoreLib.
@eerhardt
Copy link
Member

I believe this issue was addressed for .NET 5. Can it be closed? (I don't have permission to close it)

@marek-safar
Copy link
Contributor Author

There is still unconditional code in libraries for debugger support but I agree it can be closed for linker

@eerhardt
Copy link
Member

There is still unconditional code in libraries for debugger support

Do you happen to have an example? I was under the assumption we got all of them.

@marek-safar
Copy link
Contributor Author

Nothing major, mostly stuff like stubbing out the whole System.Diagnostics.Debugger type or conditions like https://github.com/dotnet/runtime/blob/6072e4d3a7a2a1493f514cdf4be75a3d56580e84/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskFactory.cs#L1591

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants