@@ -8,16 +8,16 @@ use std::thread;
88use std:: time:: Duration ;
99use std:: ffi:: OsStr ;
1010
11- use log:: { info, warn , error} ;
11+ use log:: { info, error} ;
1212use runtime_tracing:: StepId ;
1313
1414use crate :: db:: DbRecordEvent ;
1515use crate :: expr_loader:: ExprLoader ;
1616use crate :: lang:: Lang ;
1717use crate :: paths:: ct_rr_worker_socket_path;
1818use crate :: query:: CtRRQuery ;
19- use crate :: replay:: { Events , Replay } ;
20- use crate :: task:: { Action , Breakpoint , Location , CtLoadLocalsArguments , VariableWithRecord } ;
19+ use crate :: replay:: Replay ;
20+ use crate :: task:: { Action , Breakpoint , Events , Location , CtLoadLocalsArguments , ProgramEvent , VariableWithRecord } ;
2121use crate :: value:: ValueRecordWithType ;
2222
2323#[ derive( Debug ) ]
@@ -199,12 +199,13 @@ impl Replay for RRDispatcher {
199199
200200 fn load_events ( & mut self ) -> Result < Events , Box < dyn Error > > {
201201 self . ensure_active_stable ( ) ?;
202- warn ! ( "TODO load_events rr" ) ;
203- Ok ( Events {
204- events : vec ! [ ] ,
205- first_events : vec ! [ ] ,
206- contents : "" . to_string ( ) ,
207- } )
202+ let events = serde_json:: from_str :: < Events > ( & self . stable . run_query ( CtRRQuery :: LoadAllEvents ) ?) ?;
203+ Ok ( events)
204+ // Ok(Events {
205+ // events: vec![],
206+ // first_events: vec![],
207+ // contents: "".to_string(),
208+ // })
208209 }
209210
210211 fn step ( & mut self , action : Action , forward : bool ) -> Result < bool , Box < dyn Error > > {
@@ -297,6 +298,15 @@ impl Replay for RRDispatcher {
297298 ) ?)
298299 }
299300
301+ fn event_jump ( & mut self , event : & ProgramEvent ) -> Result < bool , Box < dyn Error > > {
302+ self . ensure_active_stable ( ) ?;
303+ Ok ( serde_json:: from_str :: < bool > (
304+ & self . stable . run_query (
305+ CtRRQuery :: EventJump { program_event : event. clone ( ) }
306+ ) ?
307+ ) ?)
308+ }
309+
300310 fn current_step_id ( & mut self ) -> StepId {
301311 // cache location or step_id and return
302312 // OR always load from worker
0 commit comments