Skip to content

[NativeAOT] Add method parameter names to stack trace if available - #73578

Merged
MichalStrehovsky merged 5 commits into
dotnet:mainfrom
jasper-d:aot-param-names
Aug 18, 2022
Merged

[NativeAOT] Add method parameter names to stack trace if available#73578
MichalStrehovsky merged 5 commits into
dotnet:mainfrom
jasper-d:aot-param-names

Conversation

@jasper-d

Copy link
Copy Markdown
Contributor

After taking a look at SchemaDef, I assume that parameter names are available iff we have a (Qualified)MethodHandle.

  • Added an overload for EmitMethodParameters that takes a MethodHandle and prints the parameters with type and name. Restructured the calling code to make use of it.
  • Enabled StackTraceTest
  • Changed type parameter spacing to make test pass

Fixes#73051

@ghostghost added area-NativeAOT-coreclr community-contribution Indicates that the PR has been added by a community member labels Aug 8, 2022

@MichalStrehovskyMichalStrehovsky left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great otherwise, thanks!

@jasper-d
jasper-d marked this pull request as draft August 11, 2022 19:16
@jasper-d
jasper-d marked this pull request as ready for review August 17, 2022 14:22

@MichalStrehovskyMichalStrehovsky left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great, thank you!

I'll try to get this ported into .NET 7 (we snapped from the main branch on Tuesday.)

@MichalStrehovsky
MichalStrehovsky merged commit 519d1e3 into dotnet:mainAug 18, 2022
@MichalStrehovsky

Copy link
Copy Markdown
Member

/backport to release/7.0-rc1

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/7.0-rc1: https://github.com/dotnet/runtime/actions/runs/2881987012

@jasper-d
jasper-d deleted the aot-param-names branch August 31, 2022 22:01
@ghostghost locked as resolved and limited conversation to collaborators Oct 1, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-NativeAOT-coreclrcommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stack traces should include parameter names

2 participants

@jasper-d@MichalStrehovsky