Object-Centric Debugging: a preview
Steven Costiou steven.costiou@inria.fr
RMoD

Inria Lille - Nord Europe

2019
2
Part I
Object-Centric Debugging
3
Demo
4
What is object-centric debugging?
5
Object-centric debugging
• Debugging operations at the level of objects
• Only target objects are affected
• Examples:
• A breakpoint active for one object only
• A method available for one object only
6
Why object-centric debugging?
7
Why Object-centric debugging?
• Debugging one object among many:
• Collections (Hinkle, Jones, Johnson, 1993)
• Events
• Graphical objects





8
Object-Centric Features
(preview)
9
Object-centric breakpoints
• Break when a message is received
• haltOnCall => on every method call
• haltOnCall: #selector => for given selector only
• haltOnNextCall => on next method call
• haltOnceOnCall: #selector => only once for given selector
• haltOnCallWhen: condition => if condition is met



10
Object-centric breakpoints
• Break on state access
• haltOnWriteTo: #instVarName => when instVarName is written
• haltOnRead: #instVarName => when instVarName is read
• haltOnWrite => when any instance variable is written
• haltOnRead => when any instance variable is read







11
Object-centric behavior
• Object-centric methods
• compile: sourceCode => compiles and add new methods
• uses: aTrait => acquires behavior from Trait
• acquire: aCompiledMethod => acquire the method









12
Object-centric debugging,
how is it implemented?
13
Implementation
14
Object-centric
breakpoints
Object-centric

behavior
Implementation
15
Reflectivity
Proxies
Object-centric
breakpoints
Object-centric

behavior
Implementation
16
Reflectivity
Proxies
Talents
Object-centric
breakpoints
Object-centric

behavior
Implementation
17
Reflectivity
Proxies
Talents
Anonymous

Classes
Object-centric
breakpoints
Object-centric

behavior
Implementation
18
Reflectivity
Proxies
Talents
Anonymous

Classes
Object-centric
breakpoints
Object-centric

behavior
Object-centric
… ???
Implementation goal
19
Reflectivity Proxies Talents
Anonymous

Classes
Object-centric
breakpoints
Object-centric

behavior
Object-centric layer
Object-centric

…
Current problems
• Implementation is mixing up different techniques without any
clear interaction model
• Requires to migrate the object to an anonymous subclass
• Installation of object-centric instrumentation is not thread-safe
• Sometimes make tools unstable
• Obtaining objects to debug (but work has been done on that…)





20
Part II
Object-Centric Reverse Debugging
21
Demo
22
Reverse object-centric debugger
23
Reverse object-centric debugger
24
Reverse object-centric debugger
25
Reverse object-centric debugger
26
Reverse object-centric debugger
27
Reverse object-centric debugger
28
Reverse object-centric debugger
29
Reverse object-centric debugger
30
Reverse object-centric debugger
31
Reverse object-centric debugger
32
Reverse object-centric debugger
33
WIP
Reverse object-centric debugger
• AST interpreter - Carolina Hernandez Phillips
• Reverse-execution - Vincent Aranega, Steven Costiou
• Object-centric debugger - Steven Costiou
• Scriptable debugger - Thomas Dupriez
34
Who’s working on it?
Thanks! Questions?
35
Object-Centric
Reverse Debugging
Object-Centric
Debugging
• haltOnCall
• haltOnCall: #selector
• haltOnNextCall
• haltOnceOnCall: #selector
• haltOnCallWhen: condition

• haltOnWriteTo: #instVarName
• haltOnRead: #instVarName
• haltOnWrite
• haltOnRead

• compile: sourceCode
• uses: aTrait
• acquire: aCompiledMethod

Object-Centric Debugging: a preview