Skip to content

Delete SUPPORT_LOCAL_DEBUGGING ifdef - #134664

Merged
jkotas merged 1 commit into
mainfrom
copilot/delete-support-local-debugging-ifdef
Oct 15, 2026
Merged

jkotas merged 1 commit into
mainfrom
copilot/delete-support-local-debugging-ifdef

Conversation

Copilot AI commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

SUPPORT_LOCAL_DEBUGGING in debug/di/cordb.cpp was used only by ARM's out-of-line DbiGetThreadContext/DbiSetThreadContext. ARM32 is supported only on Unix, where the define was 0, so both functions always asserted and returned FALSE.

  • debug/di/cordb.cpp
    • Removes the SUPPORT_LOCAL_DEBUGGING define.
    • Removes the ARM-only DbiGetThreadContext/DbiSetThreadContext implementations.
  • debug/di/stdafx.h
    • Removes the TARGET_ARM split.
    • ARM now uses the same macros as every other platform:
#define DbiGetThreadContext(hThread, lpContext) ::GetThreadContext(hThread, (CONTEXT*)(lpContext))
#define DbiSetThreadContext(hThread, lpContext) ::SetThreadContext(hThread, (CONTEXT*)(lpContext))

On ARM, callers now reach the PAL GetThreadContext/SetThreadContext, the same as other Unix architectures, instead of an assert-and-fail stub. Most callers are in FEATURE_INTEROP_DEBUGGING paths, which are Windows-only.

Note

This PR was generated by GitHub Copilot.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@jkotas
jkotas marked this pull request as ready for review September 25, 2026 17:08
Copilot AI lite review requested due to automatic review settings September 25, 2026 17:08
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag
See info in area-owners.md if you want to be subscribed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The ARM-specific context layout and alignment safeguards need to be retained or proven unnecessary.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
What changed in this PR

This PR removes obsolete ARM-specific debugging stubs and unifies thread-context macros across platforms.

Changes:

  • Removes SUPPORT_LOCAL_DEBUGGING and ARM-only implementations.
  • Uses shared GetThreadContext/SetThreadContext macros for ARM.
File Summary
src/​coreclr/​debug/​di/​stdafx.h Unifies context macros; a critical ARM layout and alignment concern remains.
src/​coreclr/​debug/​di/​cordb.cpp Removes obsolete ARM implementations and configuration.

Comment thread src/coreclr/debug/di/stdafx.h Resolved
Comment thread src/coreclr/debug/di/cordb.cpp Resolved
@jkotas
jkotas merged commit 0895b06 into main Oct 15, 2026
113 of 115 checks passed
@jkotas
jkotas deleted the copilot/delete-support-local-debugging-ifdef branch October 15, 2026 00:45
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Oct 19, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants