diff options
author | Michal Strehovský <MichalStrehovsky@users.noreply.github.com> | 2016-11-22 02:53:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-22 02:53:33 +0300 |
commit | cac5d0efe2783ebf81b17143d797ea1540dd9bbb (patch) | |
tree | a21a612aa5aad11546cd923a78b46bf74ae5f3f3 /src/Native/Runtime/windows | |
parent | 50043ed57329a26cf1a954da2f0b43d49e6a9810 (diff) |
Implement Exception.get_StackTrace (#2240)
This relies on the existing logic that tries DIA first, and then falls
back to reflection metadata to find method names. If fallback fails, you
get RVAs. Conveniently, the DIA path doesn't even try to run.
Diffstat (limited to 'src/Native/Runtime/windows')
-rw-r--r-- | src/Native/Runtime/windows/CoffNativeCodeManager.cpp | 6 | ||||
-rw-r--r-- | src/Native/Runtime/windows/CoffNativeCodeManager.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/Native/Runtime/windows/CoffNativeCodeManager.cpp b/src/Native/Runtime/windows/CoffNativeCodeManager.cpp index e15056ada..6692d298b 100644 --- a/src/Native/Runtime/windows/CoffNativeCodeManager.cpp +++ b/src/Native/Runtime/windows/CoffNativeCodeManager.cpp @@ -510,6 +510,12 @@ bool CoffNativeCodeManager::EHEnumNext(EHEnumState * pEHEnumState, EHClause * pE return true; } +PTR_VOID CoffNativeCodeManager::GetMethodStartAddress(MethodInfo * pMethodInfo) +{ + CoffNativeMethodInfo * pNativeMethodInfo = (CoffNativeMethodInfo *)pMethodInfo; + return dac_cast<PTR_VOID>(m_moduleBase + pNativeMethodInfo->mainRuntimeFunction->BeginAddress); +} + void * CoffNativeCodeManager::GetClasslibFunction(ClasslibFunctionId functionId) { uint32_t id = (uint32_t)functionId; diff --git a/src/Native/Runtime/windows/CoffNativeCodeManager.h b/src/Native/Runtime/windows/CoffNativeCodeManager.h index 73acfdffa..4d4c72aaf 100644 --- a/src/Native/Runtime/windows/CoffNativeCodeManager.h +++ b/src/Native/Runtime/windows/CoffNativeCodeManager.h @@ -89,5 +89,7 @@ public: bool EHEnumNext(EHEnumState * pEHEnumState, EHClause * pEHClause); + PTR_VOID GetMethodStartAddress(MethodInfo * pMethodInfo); + void * GetClasslibFunction(ClasslibFunctionId functionId); }; |