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

Fail StackTraceTests.ToString_ShowILOffset on mono interpreter mode #51096

Closed
wscho77 opened this issue Apr 12, 2021 · 1 comment · Fixed by #56137
Closed

Fail StackTraceTests.ToString_ShowILOffset on mono interpreter mode #51096

wscho77 opened this issue Apr 12, 2021 · 1 comment · Fixed by #56137
Assignees
Labels
area-Codegen-Interpreter-mono disabled-test The test is disabled in source code against the issue
Milestone

Comments

@wscho77
Copy link
Contributor

wscho77 commented Apr 12, 2021

Relates to: #44013

In mono interpreter mode, the StackFrame's ilOffset value is set to -1.
Because of this, the functionality of showing ilOffset in StackTrace when pdb is not present does not work.

@dotnet-issue-labeler dotnet-issue-labeler bot added area-Codegen-Interpreter-mono untriaged New issue has not been triaged by the area owner labels Apr 12, 2021
@ghost
Copy link

ghost commented Apr 12, 2021

Tagging subscribers to this area: @BrzVlad
See info in area-owners.md if you want to be subscribed.

Issue Details

Relates to: #44013

In mono interpreter mode, the StackFrame's ilOffset value is set to -1.
Because of this, the functionality of showing ilOffset in StackTrace when pdb is not present does not work.

Author: wscho77
Assignees: -
Labels:

area-Codegen-Interpreter-mono, untriaged

Milestone: -

wscho77 added a commit to wscho77/runtime that referenced this issue Apr 12, 2021
danmoseley pushed a commit that referenced this issue Apr 12, 2021
* Add IL Offset and Method Token to stacktrace

For easier debugging, if the PDB is not deployed, add the Method Token and IL Offset to the stacktrace.
This functionality can be turned on and off by environment setting "COMPlus_ILOffsetToStackTrace"

* Use LocalAppContextSwitch and HexConverter

Use LocalAppContextSwitch to get environment variable without using static constructor in StackTrace.
Also, use HexConverter to get metadata token and il offset without unnecessary complex.

* Use AppendFormat instead of HexConverter

Use AppendFormat() for formatting of the hex number.

* Use switch to activate ILOffset in stacktrace

- Change switch name from ILOffsetsToStackTrace to ShowILOffset
- Use "Switch.System.Diagnostics.StackTrace.ShowILOffsets" to activate ILOffset in stacktrace
- Use "DOTNET_" prefix for environment variable name (DOTNET_ILOffsetToStackTrace)

* Use AppContextConfigHelper for get switch value

* Add test case for ILOffsetToStackTrace

* Remove unused variable

* Use RemoteExecutor.Invoke for testing

* Update src/libraries/System.Private.CoreLib/src/System/LocalAppContextSwitches.cs

Co-authored-by: Noah Falk <noahfalk@users.noreply.github.com>

* TC contents are added

* Remove setting code using enviornment variable

remove setting code using environment variable and change switch default value to true.

* code clean-up. remove unused code

* Sort using statements

* Skipt test in mono interpreter mode.

Related issue : #51096

Co-authored-by: Noah Falk <noahfalk@users.noreply.github.com>
@SamMonoRT SamMonoRT added this to the 6.0.0 milestone Jun 15, 2021
@SamMonoRT SamMonoRT removed the untriaged New issue has not been triaged by the area owner label Jun 16, 2021
@SamMonoRT SamMonoRT added the disabled-test The test is disabled in source code against the issue label Jul 16, 2021
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jul 22, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Aug 9, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Codegen-Interpreter-mono disabled-test The test is disabled in source code against the issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants