Skip to content

Conversation

@guillep
Copy link
Member

@guillep guillep commented Oct 9, 2025

This PR introduces an object encapsulating the debugging API of methods/contexts: DebugInfo.
This object, used in tools such as debugger, inspector, is responsible of reading variables from a context, and to obtain bytecode to source code mappings:

  • is the current PC a send?
  • is the current PC a store?
    ...

Particular care is taken for optimized/inlined contexts, and avoiding creeping implementation details to users!!

DebugInfo comes in two flavours: online and offline.

  • the online implementation: computes the debug information on the fly using the compiler. This works similarly as what happens today. In other words, I only work if the compiler is available.
  • the offline implementation: stores debug information previously computed in an internal data structure, and is built from an online debug info. This version works when the compiler is not available.

The API is not 100% fixed, but this already goes in a good direction.

Tests are added on the debug info API (both implementations are tested), and the system was changed making sure to keep compatibility.

Related PRs: pharo-spec/NewTools#1259

@guillep guillep force-pushed the debuginfooptimizations branch 2 times, most recently from db606bb to 71078c9 Compare October 14, 2025 14:24
@guillep guillep force-pushed the debuginfooptimizations branch from 58c5f6c to 259a5e9 Compare October 15, 2025 09:57
@guillep guillep merged commit af59582 into pharo-project:Pharo14 Oct 15, 2025
1 check failed
@Ducasse
Copy link
Member

Ducasse commented Oct 15, 2025

Super super super cooooooooooool

S

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants