[GH-ISSUE #2373] [Feature] Inspect caller-selected Delphi MAP symbols with explicit address and binary provenance #786

Open
opened 2026-10-15 18:28:20 +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/2373

Type: Feature Domain: Reverse Engineering Status: Proposed Ecosystem: REA

Analyst question

Given my Delphi executable and its compiler-generated MAP file, what procedure or source line corresponds to a recorded native address?

REA can inspect native procedures, but there is no documented Delphi MAP ingestion lane. A MAP file should supply separately attributed symbol evidence without launching the program or rewriting a provider database.

Proposed outcome

  • Inspect a caller-selected MAP file offline; preserve its digest, dialect/compiler information when available, segment:offset coordinates, public symbols and recorded line tables.
  • Retain duplicate names, aliases and absent tables. Names and address-ordered public tables represent overlapping observations, not independent functions.
  • Keep segment offsets, file offsets, RVAs and runtime load addresses distinct. Convert an address only when the required segment/image mapping is established.
  • Bind an optional executable and explicit load-base evidence. A basename or plausible address range is not proof that a MAP belongs to that build; return unverified/mismatched associations explicitly.
  • Expose focused symbol/address lookups through shared CLI/MCP contracts and provenance rather than importing inferred names into another provider automatically.

Acceptance and verification

  • Synthetic MAP fixtures cover admitted dialects, reordered tables, aliases, Unicode names, truncation and malformed hexadecimal coordinates.
  • Own licensed Delphi build fixtures verify admitted Win32/Win64 mappings when available; synthetic tests alone do not establish real-compiler compatibility.
  • Same-named symbols from different units remain distinct.
  • Incorrect build associations and unresolved segment-to-RVA mappings never produce a verified source location.
  • Source paths are metadata; ingestion does not automatically read source files or fetch URLs.
  • Parsing and result paging have bounds and cancellation; one feature spec/plan is recorded under docs/specs/-delphi-map-symbols/.

Scope and relationships

Offline inspection only. TDS/RSM parsing and live target debugging need separate proposals. This is complementary to #1267 and #1193; a Delphi MAP is not a dSYM or a Portable PDB.

Primary references

Originally created by @matbrgz on GitHub (Oct 12, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/2373 [![Type: Feature](https://img.shields.io/badge/type-feature-blue.svg?style=flat-square)](https://github.com/morluto/rea) [![Domain: Reverse Engineering](https://img.shields.io/badge/domain-reverse_engineering-blueviolet.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 Given my Delphi executable and its compiler-generated MAP file, what procedure or source line corresponds to a recorded native address? REA can inspect native procedures, but there is no documented Delphi MAP ingestion lane. A MAP file should supply separately attributed symbol evidence without launching the program or rewriting a provider database. ## Proposed outcome - Inspect a caller-selected MAP file offline; preserve its digest, dialect/compiler information when available, segment:offset coordinates, public symbols and recorded line tables. - Retain duplicate names, aliases and absent tables. Names and address-ordered public tables represent overlapping observations, not independent functions. - Keep segment offsets, file offsets, RVAs and runtime load addresses distinct. Convert an address only when the required segment/image mapping is established. - Bind an optional executable and explicit load-base evidence. A basename or plausible address range is not proof that a MAP belongs to that build; return unverified/mismatched associations explicitly. - Expose focused symbol/address lookups through shared CLI/MCP contracts and provenance rather than importing inferred names into another provider automatically. ## Acceptance and verification - [ ] Synthetic MAP fixtures cover admitted dialects, reordered tables, aliases, Unicode names, truncation and malformed hexadecimal coordinates. - [ ] Own licensed Delphi build fixtures verify admitted Win32/Win64 mappings when available; synthetic tests alone do not establish real-compiler compatibility. - [ ] Same-named symbols from different units remain distinct. - [ ] Incorrect build associations and unresolved segment-to-RVA mappings never produce a verified source location. - [ ] Source paths are metadata; ingestion does not automatically read source files or fetch URLs. - [ ] Parsing and result paging have bounds and cancellation; one feature spec/plan is recorded under docs/specs/<NNN>-delphi-map-symbols/. ## Scope and relationships Offline inspection only. TDS/RSM parsing and live target debugging need separate proposals. This is complementary to #1267 and #1193; a Delphi MAP is not a dSYM or a Portable PDB. ## Primary references - [RAD Studio MAP debug-file tables](https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Map_Debug_File) - [Detailed-segments MAP generation](https://docwiki.embarcadero.com/RADStudio/Athens/en/Detailed-Segments_Map_File)
Author
Owner

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

Implementation & Scope Notes

Objective (ELI5):
Parse Delphi .MAP symbol files and bind function addresses, segment offsets, and compilation units to decompiled procedures.

Key Requirements:

  • Distinguish between standard MAP formats (Borland Delphi 7 through modern Embarcadero Delphi 12 with extended segment records).
  • Validate binary checksum / timestamp match between the .exe/.dll and the companion .map file to prevent stale or mismatched symbol attribution.
<!-- gh-comment-id:6133931764 --> @matbrgz commented on GitHub (Oct 12, 2026): ### Implementation & Scope Notes **Objective (ELI5):** Parse Delphi `.MAP` symbol files and bind function addresses, segment offsets, and compilation units to decompiled procedures. **Key Requirements:** - Distinguish between standard MAP formats (Borland Delphi 7 through modern Embarcadero Delphi 12 with extended segment records). - Validate binary checksum / timestamp match between the `.exe`/`.dll` and the companion `.map` file to prevent stale or mismatched symbol attribution.
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#786
No description provided.