SlideShare a Scribd company logo
1 of 21
Download to read offline
Design and Implementation
of a Backward-In-Time
Debugger

     Christoph Hofer
     Marcus Denker
     Stephane Ducasse




© Marcus Denker
Roadmap




>    Problem
>    Unstuck: A new Debugger for Squeak
>    Implementation
>    Lessons Learned
>    Future work




© Marcus Denker
Problem




>    Debugger: Snapshot of state at time of error

>    Cause for errors is in the past
     — Who assigned *that* value?

>    very incomplete history available
     — guess were to set breakpoint, rerun




© Marcus Denker
Example


Foo>>initialize          Foo>>bar
    var1 := 0.               ......
    var2 := ''.
                         Foo>>moreBar
Foo>>start                   var2 size > 0 ifTrue:[
    self beforeBar.              ^var2 at: 1].
    self bar.                ^''
    self moreBar.

Foo>>beforeBar
    var1 = 0 ifTrue: [
        var2 := nil.]




 © Marcus Denker
Stack Trace




> Squeak Debugger
> Shows stack trace
     — methods not
       returned
     — old state lost




© Marcus Denker
Stack Trace




> Squeak Debugger
> Shows stack trace
     — methods not
       returned
     — old state lost




© Marcus Denker
Solution




>    We want:
     — Record the history of the program
     — View the state at any point in the past


>    Unstuck
     — A new Debugger for Squeak
     — Provides full trace information




© Marcus Denker
Unstuck UI




1.   Trace
2.   Object
3.   Code
4.   History
5.   Query




© Marcus Denker
Searching


     Variable        Search Domain

     event           All events

     send            all message sends

     return          all method returns

     varAccess       all variable accesses

     instVarAccess   instance variable access

     tempVarAccess   temporary variables


© Marcus Denker
Searching: Example



     Query                       Result
     send selector = #foo        All the executed methods
                                 named ”foo”

     return returnValue > 4      All returns with a return
                                 value greater than 4
     events isSend &             Message sends with exactly
     (even arguments size = 1)   one argument



© Marcus Denker
Coloring



>   We can assign a color to any
    object

>   Easy tracking of objects

>   Color is shown in all views of
    the UI



© Marcus Denker
Implementation



                   Debugger

                         uses

                  Trace Library

                         uses

                  ByteSurgeon


© Marcus Denker
ByteSurgeon




>    Framework for editing bytecode for Squeak
     — Like Javasist in Java, but:

>    Uses structural reflection to transform at runtime
     — Simple model: Inline code before / after a bytecode
     — Inlined code is normal smalltalk code
     — Not much knowledge about bytecode needed




© Marcus Denker
Trace Library




> Called from annotated code
> Builds up the trace


>    Provides
     — Trace model
     — Event pre-processing (ordering)
     — State reconstruction




© Marcus Denker
State reconstruction




>    State not recorded for completely annotated classes
     — past state can be reconstructed from trace


>    System never completely annotated
     — Tracer saves state of non-annotated objects




© Marcus Denker
Debugging system classes




>    Annotate classes used by Bytesurgeon or Tracer
     — System classes (e.g. Collection or String)
     — Compiler (e.g. AST)


>    Problems:
     — Classes used for annotation --> crash
     — Tracer records events generated by the tracer




© Marcus Denker
Solution




> Retain both methods (original + annotated)
> Generate preamble
     — test for global
     — call original methods when inactive

>    Common problem when using reflection!
     — General solution?
     — Future work!



© Marcus Denker
Benchmarks



                  Events   Slowdown   Memory
                                      (Kb)

     Example      74       6          16


     AST Bug      2725     3.8        800


     Pier Trace   389689   248        88800



© Marcus Denker
Future Work



>    further analyze + improve
     — Memory Consumption (GC effects)
     — Performance

>    Use behavioral reflection
     — fine grained selection
     — Scoping
     — Annotation of system classes




© Marcus Denker
Conclusion



>    Problem of current debugging tools

>    Overview of Unstuck
     — UI
     — Implementation


>    Having the history available helps
     — Possible for small programs
     — Work needed for bigger systems + continuous use



© Marcus Denker
Conclusion



>    Problem of current debugging tools

>    Overview of Unstuck
     — UI
     — Implementation                  Questions?
>    Having the history available helps
     — Possible for small programs
     — Work needed for bigger systems + continuous use



© Marcus Denker

More Related Content

What's hot

Processes and Processors in Distributed Systems
Processes and Processors in Distributed SystemsProcesses and Processors in Distributed Systems
Processes and Processors in Distributed SystemsDr Sandeep Kumar Poonia
 
Processor Allocation (Distributed computing)
Processor Allocation (Distributed computing)Processor Allocation (Distributed computing)
Processor Allocation (Distributed computing)Sri Prasanna
 
Kqueue : Generic Event notification
Kqueue : Generic Event notificationKqueue : Generic Event notification
Kqueue : Generic Event notificationMahendra M
 
Multiprocessing -Interprocessing communication and process sunchronization,se...
Multiprocessing -Interprocessing communication and process sunchronization,se...Multiprocessing -Interprocessing communication and process sunchronization,se...
Multiprocessing -Interprocessing communication and process sunchronization,se...Neena R Krishna
 
Sara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time Systems
Sara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time SystemsSara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time Systems
Sara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time Systemsknowdiff
 
process management
 process management process management
process managementAshish Kumar
 
Flink Architecture
Flink Architecture Flink Architecture
Flink Architecture Prasad Wali
 
A Deep Dive into Apache Cassandra for .NET Developers
A Deep Dive into Apache Cassandra for .NET DevelopersA Deep Dive into Apache Cassandra for .NET Developers
A Deep Dive into Apache Cassandra for .NET DevelopersLuke Tillman
 
Linux process management
Linux process managementLinux process management
Linux process managementRaghu nath
 
GopherCon 2017 - Writing Networking Clients in Go: The Design & Implementati...
GopherCon 2017 -  Writing Networking Clients in Go: The Design & Implementati...GopherCon 2017 -  Writing Networking Clients in Go: The Design & Implementati...
GopherCon 2017 - Writing Networking Clients in Go: The Design & Implementati...wallyqs
 
Cassandra Architecture
Cassandra ArchitectureCassandra Architecture
Cassandra ArchitecturePrasad Wali
 
JActor Cluster Platform
JActor Cluster PlatformJActor Cluster Platform
JActor Cluster PlatformBill La Forge
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik TambekarPratik Tambekar
 
Ppt project process migration
Ppt project process migrationPpt project process migration
Ppt project process migrationjaya380
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik TambekarPratik Tambekar
 
Introduction to Apache ZooKeeper
Introduction to Apache ZooKeeperIntroduction to Apache ZooKeeper
Introduction to Apache ZooKeeperSaurav Haloi
 

What's hot (20)

Processes and Processors in Distributed Systems
Processes and Processors in Distributed SystemsProcesses and Processors in Distributed Systems
Processes and Processors in Distributed Systems
 
Chapter 6 os
Chapter 6 osChapter 6 os
Chapter 6 os
 
Processor Allocation (Distributed computing)
Processor Allocation (Distributed computing)Processor Allocation (Distributed computing)
Processor Allocation (Distributed computing)
 
Process scheduling linux
Process scheduling linuxProcess scheduling linux
Process scheduling linux
 
Kqueue : Generic Event notification
Kqueue : Generic Event notificationKqueue : Generic Event notification
Kqueue : Generic Event notification
 
Multiprocessing -Interprocessing communication and process sunchronization,se...
Multiprocessing -Interprocessing communication and process sunchronization,se...Multiprocessing -Interprocessing communication and process sunchronization,se...
Multiprocessing -Interprocessing communication and process sunchronization,se...
 
Sara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time Systems
Sara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time SystemsSara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time Systems
Sara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time Systems
 
process management
 process management process management
process management
 
Flink Architecture
Flink Architecture Flink Architecture
Flink Architecture
 
A Deep Dive into Apache Cassandra for .NET Developers
A Deep Dive into Apache Cassandra for .NET DevelopersA Deep Dive into Apache Cassandra for .NET Developers
A Deep Dive into Apache Cassandra for .NET Developers
 
Linux process management
Linux process managementLinux process management
Linux process management
 
GopherCon 2017 - Writing Networking Clients in Go: The Design & Implementati...
GopherCon 2017 -  Writing Networking Clients in Go: The Design & Implementati...GopherCon 2017 -  Writing Networking Clients in Go: The Design & Implementati...
GopherCon 2017 - Writing Networking Clients in Go: The Design & Implementati...
 
Cassandra Architecture
Cassandra ArchitectureCassandra Architecture
Cassandra Architecture
 
JActor Cluster Platform
JActor Cluster PlatformJActor Cluster Platform
JActor Cluster Platform
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Ppt project process migration
Ppt project process migrationPpt project process migration
Ppt project process migration
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Replication in the Wild
Replication in the WildReplication in the Wild
Replication in the Wild
 
Presentation
PresentationPresentation
Presentation
 
Introduction to Apache ZooKeeper
Introduction to Apache ZooKeeperIntroduction to Apache ZooKeeper
Introduction to Apache ZooKeeper
 

Similar to Design and Implementation of a Backward-In-Time Debugger

Software Evolution from the Field: an Experience Report
Software Evolution from the Field: an Experience ReportSoftware Evolution from the Field: an Experience Report
Software Evolution from the Field: an Experience ReportMarcus Denker
 
Sub-Method Reflection
Sub-Method ReflectionSub-Method Reflection
Sub-Method ReflectionMarcus Denker
 
Unanticipated Partial Behavioral Reflection
Unanticipated Partial Behavioral ReflectionUnanticipated Partial Behavioral Reflection
Unanticipated Partial Behavioral ReflectionESUG
 
Reflection and Context
Reflection and ContextReflection and Context
Reflection and ContextMarcus Denker
 
Sub-method Structural and Behavioral Reflection
Sub-method Structural and Behavioral ReflectionSub-method Structural and Behavioral Reflection
Sub-method Structural and Behavioral ReflectionMarcus Denker
 
Presentation about my Research
Presentation about my ResearchPresentation about my Research
Presentation about my ResearchMarcus Denker
 
The Reflectivity
The ReflectivityThe Reflectivity
The ReflectivityESUG
 
Talk: Practical, Pluggable Types
Talk: Practical, Pluggable TypesTalk: Practical, Pluggable Types
Talk: Practical, Pluggable TypesMarcus Denker
 
Embedded Mirror Maker
Embedded Mirror MakerEmbedded Mirror Maker
Embedded Mirror MakerSimon Suo
 
(SAS) UNIX X Command Tips and Tricks
(SAS) UNIX X Command Tips and Tricks(SAS) UNIX X Command Tips and Tricks
(SAS) UNIX X Command Tips and TricksDavid Horvath
 
SQL Server Deep Drive
SQL Server Deep Drive SQL Server Deep Drive
SQL Server Deep Drive DataArt
 
202110 SESUG 49 UNIX X Command Tips and Tricks
202110 SESUG 49 UNIX X Command Tips and Tricks202110 SESUG 49 UNIX X Command Tips and Tricks
202110 SESUG 49 UNIX X Command Tips and Tricksdhorvath
 
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...Amazon Web Services
 

Similar to Design and Implementation of a Backward-In-Time Debugger (20)

Software Evolution from the Field: an Experience Report
Software Evolution from the Field: an Experience ReportSoftware Evolution from the Field: an Experience Report
Software Evolution from the Field: an Experience Report
 
Sub-Method Reflection
Sub-Method ReflectionSub-Method Reflection
Sub-Method Reflection
 
Reflection
ReflectionReflection
Reflection
 
Lecture: Reflection
Lecture: ReflectionLecture: Reflection
Lecture: Reflection
 
Unanticipated Partial Behavioral Reflection
Unanticipated Partial Behavioral ReflectionUnanticipated Partial Behavioral Reflection
Unanticipated Partial Behavioral Reflection
 
Reflection and Context
Reflection and ContextReflection and Context
Reflection and Context
 
Sub-method Structural and Behavioral Reflection
Sub-method Structural and Behavioral ReflectionSub-method Structural and Behavioral Reflection
Sub-method Structural and Behavioral Reflection
 
Reflectivity Demo
Reflectivity DemoReflectivity Demo
Reflectivity Demo
 
Presentation about my Research
Presentation about my ResearchPresentation about my Research
Presentation about my Research
 
Refactoring
RefactoringRefactoring
Refactoring
 
The Reflectivity
The ReflectivityThe Reflectivity
The Reflectivity
 
Talk: Practical, Pluggable Types
Talk: Practical, Pluggable TypesTalk: Practical, Pluggable Types
Talk: Practical, Pluggable Types
 
Embedded Mirror Maker
Embedded Mirror MakerEmbedded Mirror Maker
Embedded Mirror Maker
 
Nesc tutorial
Nesc tutorialNesc tutorial
Nesc tutorial
 
(SAS) UNIX X Command Tips and Tricks
(SAS) UNIX X Command Tips and Tricks(SAS) UNIX X Command Tips and Tricks
(SAS) UNIX X Command Tips and Tricks
 
Stoop 305-reflective programming5
Stoop 305-reflective programming5Stoop 305-reflective programming5
Stoop 305-reflective programming5
 
SQL Server Deep Drive
SQL Server Deep Drive SQL Server Deep Drive
SQL Server Deep Drive
 
202110 SESUG 49 UNIX X Command Tips and Tricks
202110 SESUG 49 UNIX X Command Tips and Tricks202110 SESUG 49 UNIX X Command Tips and Tricks
202110 SESUG 49 UNIX X Command Tips and Tricks
 
OSEK / VDX
OSEK / VDXOSEK / VDX
OSEK / VDX
 
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
 

More from Marcus Denker

ConstantBlocks in Pharo11
ConstantBlocks in Pharo11ConstantBlocks in Pharo11
ConstantBlocks in Pharo11Marcus Denker
 
First Class Variables as AST Annotations
First Class Variables as AST AnnotationsFirst Class Variables as AST Annotations
First Class Variables as AST AnnotationsMarcus Denker
 
Supporting Pharo / Getting Pharo Support
Supporting Pharo / Getting Pharo SupportSupporting Pharo / Getting Pharo Support
Supporting Pharo / Getting Pharo SupportMarcus Denker
 
Lecture: "Advanced Reflection: MetaLinks"
Lecture: "Advanced Reflection: MetaLinks"Lecture: "Advanced Reflection: MetaLinks"
Lecture: "Advanced Reflection: MetaLinks"Marcus Denker
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the DebuggerMarcus Denker
 
Lecture. Advanced Reflection: MetaLinks
Lecture. Advanced Reflection: MetaLinksLecture. Advanced Reflection: MetaLinks
Lecture. Advanced Reflection: MetaLinksMarcus Denker
 
Improving code completion for Pharo
Improving code completion for PharoImproving code completion for Pharo
Improving code completion for PharoMarcus Denker
 
VUB Brussels Lecture 2019: Advanced Reflection: MetaLinks
VUB Brussels Lecture 2019: Advanced Reflection: MetaLinksVUB Brussels Lecture 2019: Advanced Reflection: MetaLinks
VUB Brussels Lecture 2019: Advanced Reflection: MetaLinksMarcus Denker
 
Lecture: Advanced Reflection. MetaLinks
Lecture: Advanced Reflection. MetaLinksLecture: Advanced Reflection. MetaLinks
Lecture: Advanced Reflection. MetaLinksMarcus Denker
 
Open-Source: An Infinite Game
Open-Source: An Infinite GameOpen-Source: An Infinite Game
Open-Source: An Infinite GameMarcus Denker
 
PharoTechTalk: Contributing to Pharo
PharoTechTalk: Contributing to PharoPharoTechTalk: Contributing to Pharo
PharoTechTalk: Contributing to PharoMarcus Denker
 
Feedback Loops in Practice
Feedback Loops in PracticeFeedback Loops in Practice
Feedback Loops in PracticeMarcus Denker
 

More from Marcus Denker (20)

Soil And Pharo
Soil And PharoSoil And Pharo
Soil And Pharo
 
ConstantBlocks in Pharo11
ConstantBlocks in Pharo11ConstantBlocks in Pharo11
ConstantBlocks in Pharo11
 
Demo: Improved DoIt
Demo: Improved DoItDemo: Improved DoIt
Demo: Improved DoIt
 
First Class Variables as AST Annotations
First Class Variables as AST AnnotationsFirst Class Variables as AST Annotations
First Class Variables as AST Annotations
 
Supporting Pharo / Getting Pharo Support
Supporting Pharo / Getting Pharo SupportSupporting Pharo / Getting Pharo Support
Supporting Pharo / Getting Pharo Support
 
Lecture: "Advanced Reflection: MetaLinks"
Lecture: "Advanced Reflection: MetaLinks"Lecture: "Advanced Reflection: MetaLinks"
Lecture: "Advanced Reflection: MetaLinks"
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the Debugger
 
Variables in Pharo
Variables in PharoVariables in Pharo
Variables in Pharo
 
Lecture. Advanced Reflection: MetaLinks
Lecture. Advanced Reflection: MetaLinksLecture. Advanced Reflection: MetaLinks
Lecture. Advanced Reflection: MetaLinks
 
Improving code completion for Pharo
Improving code completion for PharoImproving code completion for Pharo
Improving code completion for Pharo
 
VUB Brussels Lecture 2019: Advanced Reflection: MetaLinks
VUB Brussels Lecture 2019: Advanced Reflection: MetaLinksVUB Brussels Lecture 2019: Advanced Reflection: MetaLinks
VUB Brussels Lecture 2019: Advanced Reflection: MetaLinks
 
Slot Composition
Slot CompositionSlot Composition
Slot Composition
 
Lecture: Advanced Reflection. MetaLinks
Lecture: Advanced Reflection. MetaLinksLecture: Advanced Reflection. MetaLinks
Lecture: Advanced Reflection. MetaLinks
 
PHARO IOT
PHARO IOTPHARO IOT
PHARO IOT
 
Open-Source: An Infinite Game
Open-Source: An Infinite GameOpen-Source: An Infinite Game
Open-Source: An Infinite Game
 
Lecture: MetaLinks
Lecture: MetaLinksLecture: MetaLinks
Lecture: MetaLinks
 
PharoTechTalk: Contributing to Pharo
PharoTechTalk: Contributing to PharoPharoTechTalk: Contributing to Pharo
PharoTechTalk: Contributing to Pharo
 
Feedback Loops in Practice
Feedback Loops in PracticeFeedback Loops in Practice
Feedback Loops in Practice
 
Pharo6 - ESUG17
Pharo6 - ESUG17Pharo6 - ESUG17
Pharo6 - ESUG17
 
Pharo6
Pharo6Pharo6
Pharo6
 

Recently uploaded

My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 

Recently uploaded (20)

My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 

Design and Implementation of a Backward-In-Time Debugger

  • 1. Design and Implementation of a Backward-In-Time Debugger Christoph Hofer Marcus Denker Stephane Ducasse © Marcus Denker
  • 2. Roadmap > Problem > Unstuck: A new Debugger for Squeak > Implementation > Lessons Learned > Future work © Marcus Denker
  • 3. Problem > Debugger: Snapshot of state at time of error > Cause for errors is in the past — Who assigned *that* value? > very incomplete history available — guess were to set breakpoint, rerun © Marcus Denker
  • 4. Example Foo>>initialize Foo>>bar var1 := 0. ...... var2 := ''. Foo>>moreBar Foo>>start var2 size > 0 ifTrue:[ self beforeBar. ^var2 at: 1]. self bar. ^'' self moreBar. Foo>>beforeBar var1 = 0 ifTrue: [ var2 := nil.] © Marcus Denker
  • 5. Stack Trace > Squeak Debugger > Shows stack trace — methods not returned — old state lost © Marcus Denker
  • 6. Stack Trace > Squeak Debugger > Shows stack trace — methods not returned — old state lost © Marcus Denker
  • 7. Solution > We want: — Record the history of the program — View the state at any point in the past > Unstuck — A new Debugger for Squeak — Provides full trace information © Marcus Denker
  • 8. Unstuck UI 1. Trace 2. Object 3. Code 4. History 5. Query © Marcus Denker
  • 9. Searching Variable Search Domain event All events send all message sends return all method returns varAccess all variable accesses instVarAccess instance variable access tempVarAccess temporary variables © Marcus Denker
  • 10. Searching: Example Query Result send selector = #foo All the executed methods named ”foo” return returnValue > 4 All returns with a return value greater than 4 events isSend & Message sends with exactly (even arguments size = 1) one argument © Marcus Denker
  • 11. Coloring > We can assign a color to any object > Easy tracking of objects > Color is shown in all views of the UI © Marcus Denker
  • 12. Implementation Debugger uses Trace Library uses ByteSurgeon © Marcus Denker
  • 13. ByteSurgeon > Framework for editing bytecode for Squeak — Like Javasist in Java, but: > Uses structural reflection to transform at runtime — Simple model: Inline code before / after a bytecode — Inlined code is normal smalltalk code — Not much knowledge about bytecode needed © Marcus Denker
  • 14. Trace Library > Called from annotated code > Builds up the trace > Provides — Trace model — Event pre-processing (ordering) — State reconstruction © Marcus Denker
  • 15. State reconstruction > State not recorded for completely annotated classes — past state can be reconstructed from trace > System never completely annotated — Tracer saves state of non-annotated objects © Marcus Denker
  • 16. Debugging system classes > Annotate classes used by Bytesurgeon or Tracer — System classes (e.g. Collection or String) — Compiler (e.g. AST) > Problems: — Classes used for annotation --> crash — Tracer records events generated by the tracer © Marcus Denker
  • 17. Solution > Retain both methods (original + annotated) > Generate preamble — test for global — call original methods when inactive > Common problem when using reflection! — General solution? — Future work! © Marcus Denker
  • 18. Benchmarks Events Slowdown Memory (Kb) Example 74 6 16 AST Bug 2725 3.8 800 Pier Trace 389689 248 88800 © Marcus Denker
  • 19. Future Work > further analyze + improve — Memory Consumption (GC effects) — Performance > Use behavioral reflection — fine grained selection — Scoping — Annotation of system classes © Marcus Denker
  • 20. Conclusion > Problem of current debugging tools > Overview of Unstuck — UI — Implementation > Having the history available helps — Possible for small programs — Work needed for bigger systems + continuous use © Marcus Denker
  • 21. Conclusion > Problem of current debugging tools > Overview of Unstuck — UI — Implementation Questions? > Having the history available helps — Possible for small programs — Work needed for bigger systems + continuous use © Marcus Denker