From 4d3c58a063346b24655a57bfe04106ac0d08d850 Mon Sep 17 00:00:00 2001 From: Chris Sienkiewicz Date: Tue, 17 Apr 2018 20:19:29 -0700 Subject: Ensure thumb bit is set when searching for debugger jit info on ARM (#17617) * Ensure thumb bit is set when searching for debugger jit info on ARM * Make GetCodeStartAddress return correct PCODE, rather than fixing it at the callee site * Fix type in daccess.h * Use PINSTRToPCODE rather than manually adding the thumb bit --- src/inc/daccess.h | 2 +- src/vm/codeman.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/inc/daccess.h b/src/inc/daccess.h index 50a3b92bc9..01ed65dc76 100644 --- a/src/inc/daccess.h +++ b/src/inc/daccess.h @@ -2414,7 +2414,7 @@ typedef DPTR(RUNTIME_FUNCTION) PTR_RUNTIME_FUNCTION; //---------------------------------------------------------------------------- // // A PCODE is a valid PC/IP value -- a pointer to an instruction, possibly including some processor mode bits. -// (On ARM, for example, a PCODE value should should have the low-order THUMB_CODE bit set if the code should +// (On ARM, for example, a PCODE value should have the low-order THUMB_CODE bit set if the code should // be executed in that mode.) // typedef TADDR PCODE; diff --git a/src/vm/codeman.cpp b/src/vm/codeman.cpp index aa3c1fa1ed..94e849fd44 100644 --- a/src/vm/codeman.cpp +++ b/src/vm/codeman.cpp @@ -4166,7 +4166,7 @@ PCODE ExecutionManager::GetCodeStartAddress(PCODE currentPC) EECodeInfo codeInfo(currentPC); if (!codeInfo.IsValid()) return NULL; - return (PCODE)codeInfo.GetStartAddress(); + return PINSTRToPCODE(codeInfo.GetStartAddress()); } //************************************************************************** -- cgit v1.2.3