Added vreplay with stdout

This commit is contained in:
2022-03-11 19:11:09 -05:00
parent cfd299006f
commit e4ebfcbdb1
3 changed files with 40 additions and 16 deletions

View File

@@ -160,6 +160,7 @@ std::string_view rlog_string(std::ifstream &s, char *rlog_buf) {
ReplayPlayer::ReplayPlayer() {
status_ = ST_REPLAYING;
enable_stdout_ = false;
buf_.reset(new char[RLOG_BUFSIZE]);
}
@@ -344,6 +345,10 @@ void ReplayPlayer::drv_sent_outgoing() {
set_status(ST_NONDERMINISTIC);
return;
}
if ((chid == 0) && (enable_stdout_)) {
std::string_view sub = data.substr(0, nbytes);
std::cout << sub;
}
e_->drv_sent_outgoing(chid, nbytes);
}