-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Fix debugger interaction in the interpreter #118699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
067fb99
9e0075f
5be5f2b
771066a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2207,7 +2207,8 @@ MethodDesc* NonVirtualEntry2MethodDesc(PCODE entryPoint) | |||||
| } | ||||||
| CONTRACTL_END | ||||||
|
|
||||||
| RangeSection* pRS = ExecutionManager::FindCodeRange(entryPoint, ExecutionManager::GetScanFlags()); | ||||||
| ExecutionManager::ScanFlag scanFlag = ExecutionManager::GetScanFlags(); | ||||||
| RangeSection* pRS = ExecutionManager::FindCodeRange(entryPoint, scanFlag); | ||||||
| if (pRS == NULL) | ||||||
| { | ||||||
| return NULL; | ||||||
|
|
@@ -2222,7 +2223,18 @@ MethodDesc* NonVirtualEntry2MethodDesc(PCODE entryPoint) | |||||
| } | ||||||
| if (pRS->_pRangeList->GetCodeBlockKind() == STUB_CODE_BLOCK_STUBPRECODE) | ||||||
| { | ||||||
| return (MethodDesc*)((StubPrecode*)PCODEToPINSTR(entryPoint))->GetMethodDesc(); | ||||||
| StubPrecode *stubPrecode = (StubPrecode*)PCODEToPINSTR(entryPoint); | ||||||
| #ifdef FEATURE_INTERPRETER | ||||||
| if (stubPrecode->GetType() == PRECODE_INTERPRETER) | ||||||
| { | ||||||
| entryPoint = dac_cast<PTR_InterpreterPrecode>(stubPrecode)->GetData()->ByteCodeAddr; | ||||||
| pRS = ExecutionManager::FindCodeRange(entryPoint, scanFlag); | ||||||
| } | ||||||
| else | ||||||
| #endif // FEATURE_INTERPRETER | ||||||
| { | ||||||
| return (MethodDesc*)(stubPrecode)->GetMethodDesc(); | ||||||
|
||||||
| return (MethodDesc*)(stubPrecode)->GetMethodDesc(); | |
| return stubPrecode->GetMethodDesc(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it wants (MethodDesc*)(stubPrecode->GetMethodDesc()), which feels better to me also
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will end up creating codeinfo for a different IP than the one passed into Init. I can imagine that it is fixing a problem somewhere, but it is likely creating different problems somewhere else. Is this going to break places like
runtime/src/coreclr/vm/threadsuspend.cpp
Lines 5787 to 5789 in 2a95831