Implement source/line number support for Exception.StackTrace. (dotnet/coreclr#5078)
authorMike McLaughlin <mikem@microsoft.com>
Thu, 19 May 2016 17:14:56 +0000 (10:14 -0700)
committerMike McLaughlin <mikem@microsoft.com>
Thu, 19 May 2016 17:14:56 +0000 (10:14 -0700)
commitbf9a4b13f3e2c0558ce39976c76ebab08ffa26de
tree7c346c72e417ffd4e98e5301a3873edfd6734f82
parent3ece04f53d88ce78bac3b325291fc00622f074fe
Implement source/line number support for Exception.StackTrace. (dotnet/coreclr#5078)

* Implement source/line number support for Exception.StackTrace.

Uses a new helper class (StackTraceSymbols) in System.Diagnostics.StackTrace assembly
to get source/line info for portable PDBs. On Windows both types of pdbs are support;
on xplat only portable PDBs.

The first part of the work is in the GetStackFramesInternal pinvoke to return the neccessary
info needed by the portable pdb reader: MethodToken, assembly path, loaded PE image address
and if in-memory symbol file, the address.

The second part is in the StackFrameHelper in mscorlib. It attempts to load the System.Diagnostics.StackTrace,
gets the new type and creates a delegate to the helper function which is called for each stack
frame.

* Code review feedback.

Commit migrated from https://github.com/dotnet/coreclr/commit/76837be7f1216bc0a970b20c30db006c9e6dacbe
src/coreclr/src/mscorlib/src/System/Diagnostics/Stackframe.cs
src/coreclr/src/mscorlib/src/System/Diagnostics/Stacktrace.cs
src/coreclr/src/vm/debugdebugger.cpp
src/coreclr/src/vm/debugdebugger.h
src/coreclr/src/vm/mscorlib.h