Skip to content
This repository was archived by the owner on Nov 1, 2020. It is now read-only.

Additional debug data #3932

Merged
merged 4 commits into from
Jun 23, 2017
Merged

Conversation

davidwrighton
Copy link
Member

Add more complete and correct debug data. Depends on dotnet/llilc#1082

  • Correctly handle this pointers on structure methods
  • Represent base type more accurately
  • Represent static fields in type index data (symbol records need to exist for this support to work end to end)
  • Make UserDefinedTypeDescriptor thread safe (by placing a lock around all public api surface, and reducing the public surface to functions intended for use outside of the function)
  • Add support for Pointer types
  • Add support for ByRef types
  • Add support for Method type indices
  • Add support for MethodID type indices
  • Tweak name mangling so that it is possible to create a natvis file that allows simple inspection of arrays in the debugger
  • Natvis file (currently only hooked up to repronative) that will allow inspection of strings/some arrays naturally in the VS debugger

[WIP] as it depends on dotnet/llilc#1082 to be checked in first, and a proper nuget package created.

- Support ByRef and Pointer types
- Support base class as being a non-pointer wrapped thing
- Remove unnecessary UniqueName from api
- Generate struct records for enums as well as enum records
- Support MemberFunction and MemberFunctionId type records
- Support for this pointer records
- Make api thread safe
Fixup this pointer type handling
Copy link
Contributor

@nattress nattress left a comment

Choose a reason for hiding this comment

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

LGTM (Not an expert in debugging info, so take that with a grain of salt).

@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26507.0
VisualStudioVersion = 15.0.26524.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Were these changes deliberate?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, that was my copy of VS doing "stuff"

}
catch (OverflowException)
{
return 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is 0 a sentinel for "invalid"? The caller doesn't do anything special with this value - or does this just quietly make us show no type info in the debugger?

Copy link
Member Author

Choose a reason for hiding this comment

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

It makes the debugger quietly fail.

@sandreenko
Copy link

I just published ObjectWriter with your changes, could you update this PR with the 19 version?
Changes LGTM.

@davidwrighton davidwrighton changed the title [WIP] Additional debug data Additional debug data Jun 23, 2017
@davidwrighton davidwrighton merged commit 00eda89 into dotnet:master Jun 23, 2017
@davidwrighton davidwrighton deleted the additional_debug_data branch June 23, 2017 17:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants