Skip to content

Commit ecacf14

Browse files
alehander92pxor
andcommitted
fix: fix tracepoint tests; comment out for now rr_test; add a note for Box<Db>
tracepoint tests: `jump_to` with replay to sync stepping; add a note for `Box<Db>` debugged together with Nedy Co-authored-by: pxor <nedislav@gmail.com>
1 parent dbbfc30 commit ecacf14

File tree

3 files changed

+223
-214
lines changed

3 files changed

+223
-214
lines changed

src/db-backend/src/db.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -785,6 +785,11 @@ pub enum EndOfProgram {
785785

786786
#[derive(Debug)]
787787
pub struct DbReplay {
788+
// to optimize and prevents problems with too many `.clone()`
789+
// currently mostly in flow;
790+
// we can try to share a readonly version: `Rc`? `RefCell`?
791+
// or we can leave it like this for now and expect that the new format
792+
// will deal with that?
788793
pub db: Box<Db>,
789794
pub step_id: StepId,
790795
pub call_key: CallKey,

src/db-backend/src/tracepoint_interpreter/tests.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ use runtime_tracing::{StepId, TypeKind};
1414
use crate::{
1515
db::{Db, DbReplay},
1616
lang::Lang,
17+
replay::Replay,
1718
task::StringAndValueTuple,
1819
trace_processor::{load_trace_data, load_trace_metadata, TraceProcessor},
1920
value::Value,
@@ -102,6 +103,7 @@ fn check_tracepoint_evaluate(
102103
let mut db_replay = DbReplay::new(Box::new(db.clone()));
103104
for step in db.step_from(StepId(0), true) {
104105
let curr_line = step.line.0 as usize;
106+
db_replay.jump_to(step.step_id)?;
105107

106108
if line == curr_line {
107109
let actual = interpreter.evaluate(0, step.step_id, &mut db_replay, lang);

0 commit comments

Comments
 (0)