Skip to content

Conversation

@AntonLapounov
Copy link
Member

@AntonLapounov AntonLapounov commented Feb 15, 2021

  • Emit correct CodeView register numbers for ARM64. Support x86 and ARM as well.
  • Stop emitting uninitialized Hdr's fields to the PDB file.

Note that ordering of special ARM64 registers is different in cordebuginfo.h and cvconst.h from DIA SDK:

Header file ARM64 register order
cordebuginfo.h FP, LR, SP, PC
cvconst.h FP, LR, SP, ZR, PC

I am not sure we can insert the ZR register into the RegNum enumeration in cordebuginfo.h without creating a potential mess between different .NET versions. For instance, the debugger uses the hard-coded value of REGNUM_AMBIENT_SP, which would change after the insertion:

#define DBG_TARGET_REGNUM_AMBIENT_SP 34

For that reason I handle ARM64's PC register separately. Of course, PC is very unlikely to be used for locals, so we might stop at SP instead.

@AntonLapounov AntonLapounov added the area-NativeAOT-coreclr .NET runtime optimized for ahead of time compilation label Feb 15, 2021
Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

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

Thank you!

@jkotas jkotas merged commit 0298d07 into dotnet:feature/NativeAOT Feb 15, 2021
@AntonLapounov AntonLapounov deleted the DebugInfoForLocals branch February 15, 2021 18:58
MichalStrehovsky added a commit to MichalStrehovsky/runtimelab that referenced this pull request Feb 20, 2021
The debugging experience regressed in dotnet#689. JIT encodes the x64 registers in the same order as x86, but CodeView people decided they would like to sort registers alphabetically this time. Mapping is more tricky.
MichalStrehovsky added a commit that referenced this pull request Feb 20, 2021
The debugging experience regressed in #689. JIT encodes the x64 registers in the same order as x86, but CodeView people decided they would like to sort registers alphabetically this time. Mapping is more tricky.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-NativeAOT-coreclr .NET runtime optimized for ahead of time compilation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants