From d763f07d4b1338b3764cd238388b8fdce9bfa2c3 Mon Sep 17 00:00:00 2001 From: Koundinya Veluri Date: Sun, 30 Jun 2019 11:23:29 -0700 Subject: [PATCH] For sos.u on a code address, pass in the code address to retrieve information about that code version (#369) - In particular for the pointer to saved original code when using GCStress, which is specific to the code version - Part of https://github.com/dotnet/coreclr/pull/25261 - Part of fix for https://github.com/dotnet/coreclr/issues/17646 --- src/SOS/Strike/strike.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/SOS/Strike/strike.cpp b/src/SOS/Strike/strike.cpp index 9a298cf29..4461be4ea 100644 --- a/src/SOS/Strike/strike.cpp +++ b/src/SOS/Strike/strike.cpp @@ -9175,7 +9175,15 @@ DECLARE_API(u) } DacpMethodDescData MethodDescData; - if ((Status=MethodDescData.Request(g_sos, TO_CDADDR(methodDesc))) != S_OK) + Status = + g_sos->GetMethodDescData( + TO_CDADDR(methodDesc), + dwStartAddr == methodDesc ? NULL : dwStartAddr, + &MethodDescData, + 0, // cRevertedRejitVersions + NULL, // rgRevertedRejitData + NULL); // pcNeededRevertedRejitData + if (Status != S_OK) { ExtOut("Failed to get method desc for %p.\n", SOS_PTR(dwStartAddr)); return Status; @@ -9319,7 +9327,7 @@ DECLARE_API(u) { ReportOOM(); } - else if (g_sos->TraverseEHInfo(MethodDescData.NativeCodeAddr, gatherEh, (LPVOID)pInfo) != S_OK) + else if (g_sos->TraverseEHInfo(codeHeaderData.MethodStart, gatherEh, (LPVOID)pInfo) != S_OK) { ExtOut("Failed to gather EHInfo data\n"); delete pInfo; -- 2.34.1