[GH-ISSUE #2375] [Design] Delphi stopped-frame values and exception evidence without implicit property evaluation #788

Open
opened 2026-10-15 18:28:21 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @matbrgz on GitHub (Oct 12, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/2375

Type: Architecture / RFC Status: Proposed Ecosystem: REA

Analyst question

At a breakpoint or language exception in my Delphi program, what do the observed stack, locals and object fields establish?

This is a Delphi-specific capability lane on #1267. #2373 supplies offline MAP evidence; MAP symbols alone do not establish runtime types, variable locations or values.

Proposed scope

  • Select an exact executable/runtime, architecture and caller-provided debug files; distinguish Win32 and Win64 support and compiler versions actually tested.
  • Preserve resolved units, procedures, source locations, exception stop kind and provider stop identity.
  • Read supported locals, raw fields, strings and references with source type/debug evidence. Do not infer a value from a property name or call a getter to populate an inspection result.
  • Report unsupported TDS/RSM/debug formats, optimized-out variables and absent type metadata precisely. Bind every sidecar separately and do not claim association from matching basenames.
  • Keep raw register observations separate from decoded parameters. Delphi calling conventions, implicit Self and hidden result parameters need explicit compiler/architecture evidence; a C ABI interpretation is insufficient.
  • Inherit session control and cleanup from #1267. Evaluations, method calls and writes require distinct effects rather than being hidden in variable rendering.

Acceptance

  • Own licensed Delphi fixtures cover procedures, class fields, ShortString/UnicodeString, dynamic arrays and caught/uncaught exceptions for each advertised platform.
  • A property getter that increments a counter is never invoked by field inspection.
  • Win32 calling-convention fixtures distinguish register, cdecl and hidden parameters; Win64 claims have their own verification.
  • Missing/wrong debug files and optimized builds return partial/unavailable facets.
  • Stop-scoped references become stale after resume; cancellation reports cleanup and retained resources.
  • One Delphi-specific feature spec and plan precede implementation.

Integration decision and sources

New runtime capabilities require explicit maintainer scope approval before substantial implementation for integration under CONTRIBUTING.md.

Originally created by @matbrgz on GitHub (Oct 12, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/2375 [![Type: Architecture / RFC](https://img.shields.io/badge/type-architecture_%2F_RFC-darkred.svg?style=flat-square)](https://github.com/morluto/rea) [![Status: Proposed](https://img.shields.io/badge/status-proposed-blue.svg?style=flat-square)](https://github.com/morluto/rea) [![Ecosystem: REA](https://img.shields.io/badge/ecosystem-morluto%2Frea-8A2BE2.svg?style=flat-square)](https://github.com/morluto/rea) ## Analyst question At a breakpoint or language exception in my Delphi program, what do the observed stack, locals and object fields establish? This is a Delphi-specific capability lane on #1267. #2373 supplies offline MAP evidence; MAP symbols alone do not establish runtime types, variable locations or values. ## Proposed scope - Select an exact executable/runtime, architecture and caller-provided debug files; distinguish Win32 and Win64 support and compiler versions actually tested. - Preserve resolved units, procedures, source locations, exception stop kind and provider stop identity. - Read supported locals, raw fields, strings and references with source type/debug evidence. Do not infer a value from a property name or call a getter to populate an inspection result. - Report unsupported TDS/RSM/debug formats, optimized-out variables and absent type metadata precisely. Bind every sidecar separately and do not claim association from matching basenames. - Keep raw register observations separate from decoded parameters. Delphi calling conventions, implicit Self and hidden result parameters need explicit compiler/architecture evidence; a C ABI interpretation is insufficient. - Inherit session control and cleanup from #1267. Evaluations, method calls and writes require distinct effects rather than being hidden in variable rendering. ## Acceptance - [ ] Own licensed Delphi fixtures cover procedures, class fields, ShortString/UnicodeString, dynamic arrays and caught/uncaught exceptions for each advertised platform. - [ ] A property getter that increments a counter is never invoked by field inspection. - [ ] Win32 calling-convention fixtures distinguish register, cdecl and hidden parameters; Win64 claims have their own verification. - [ ] Missing/wrong debug files and optimized builds return partial/unavailable facets. - [ ] Stop-scoped references become stale after resume; cancellation reports cleanup and retained resources. - [ ] One Delphi-specific feature spec and plan precede implementation. ## Integration decision and sources New runtime capabilities require explicit maintainer scope approval before substantial implementation for integration under CONTRIBUTING.md. - [Delphi parameter/result conventions](https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Program_Control_%28Delphi%29) - [Property getters and debugger side effects](https://docwiki.embarcadero.com/RADStudio/Athens/en/Displaying_Property_Values_Derived_from_Functions_in_the_Debug_Inspector) - [Remote symbol-file distinctions](https://docwiki.embarcadero.com/RADStudio/Athens/en/Overview_of_Remote_Debugging)
Author
Owner

@matbrgz commented on GitHub (Oct 12, 2026):

Design & Safety Review Notes

Objective (ELI5):
Capture call stacks and exception object states in Delphi native binaries without evaluating Delphi property getters (which execute arbitrary Pascal code under the hood).

Safety Rules:

  1. Raw Field Inspection Only: Inspect raw struct/record offsets and class virtual tables (VMT); suppress synthetic property getter evaluations during frame stops.
  2. Exception Evidence: Capture Delphi Exception.Message string via raw shortstring/unicodestring memory layout dereference rather than invoking method dispatchers.
<!-- gh-comment-id:6133929840 --> @matbrgz commented on GitHub (Oct 12, 2026): ### Design & Safety Review Notes **Objective (ELI5):** Capture call stacks and exception object states in Delphi native binaries without evaluating Delphi property getters (which execute arbitrary Pascal code under the hood). **Safety Rules:** 1. **Raw Field Inspection Only:** Inspect raw struct/record offsets and class virtual tables (VMT); suppress synthetic property getter evaluations during frame stops. 2. **Exception Evidence:** Capture Delphi `Exception.Message` string via raw shortstring/unicodestring memory layout dereference rather than invoking method dispatchers.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#788
No description provided.