Repository navigation
fix: keep hot-reload-patched callers visible in pause-point caller frames - #2277
Conversation
…ames Harmony patch bodies appear as MonoMod.Utils.DynamicMethodDefinition with a _PatchN name, so the MonoMod. prefix skip dropped every hot-reloaded caller. Resolve those frames to the original Type.Method before applying the infrastructure skip. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe pause-point caller selector now recognizes Harmony dynamic patch methods, restores their original ChangesHarmony caller-frame reporting
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant CallerStack
participant SourcePausePointCallerFrameSelector
participant FormatMethodDisplay
CallerStack->>SourcePausePointCallerFrameSelector: Supply Harmony dynamic frames
SourcePausePointCallerFrameSelector->>SourcePausePointCallerFrameSelector: Validate and strip _PatchN suffix
SourcePausePointCallerFrameSelector->>FormatMethodDisplay: Format async state-machine method
FormatMethodDisplay-->>SourcePausePointCallerFrameSelector: Return logical Type.Method
SourcePausePointCallerFrameSelector-->>CallerStack: Return method-only caller frame
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
A patched async body surfaces as a state-machine MoveNext_PatchN name; route it through the same demangling as compiled frames so the payload keeps the logical method name. Align the skip-prefix bullet with that Harmony exception. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
CallerFramesnow keep hot-reload-patched callers visible, reported as method-only frames under the originalType.Methodname.[].User Impact
[].Methodonly (FileandLineomitted, because a dynamic method carries no debug symbols). Compiled callers still includeFile/Line.Changes
MonoMod.Utils.DynamicMethodDefinition+_Patch{N}name) to the originalType.Methodbefore the infrastructure prefix skip.Verification
dist/darwin-arm64/uloop compile: ErrorCount 0PausePointCallerFrameSelectorTests: 39 passed (6 new cases covering_Patch1,_Patch12, no-suffix DMD,_PatchX, patched uloop-internal skip, and the all-patched chain)scripts/sync-tool-docs.sh --check: catalog matches skill parameter tablesLive repro with the dist binary (temporary probe, not in this PR):
Dump 2 — nearest caller hot-reloaded,
Updatestill compiled:[ { "Method": "CallerFrameProbe.ShallowCaller" }, { "Method": "CallerFrameProbe.Update", "File": "Assets/CallerFrameProbe.cs", "Line": 15 } ]Dump 3 — both callers hot-reloaded (previously
[]):[ { "Method": "CallerFrameProbe.ShallowCaller" }, { "Method": "CallerFrameProbe.Update" } ]