This commit is contained in:
LYC 2024-10-28 14:57:05 +08:00
parent 93c948cb3a
commit 02d26b6c7a
2 changed files with 11 additions and 5 deletions

View File

@ -8,19 +8,19 @@ int main(int argc, char *argv[])
{
if (argc != 7)
{
throw "Para Err."
throw "Para Err.";
}
auto fileName = std::string(argv[6]);
struct stat buffer;
if (stat(("../traces/" + tf).c_str(), &buffer))
if (stat(("../traces/" + argv[6]).c_str(), &buffer))
{
throw "traces file Err.";
}
auto cache = new Cache(char *argv[]);
auto cache = new Cache(argv[]);
ifstream trace("../traces/" + p.TraceFile());
ifstream trace("../traces/" + fileName);
string line;
char op;
unsigned addr;

View File

@ -11,3 +11,9 @@
#include <exception>
#include <fstream>
#include <iostream>
#include <cstdlib>
#include <sstream>
#include <stdexcept>
#include <stdlib.h>
#include <stdio.h>
#include <sys/stat.h>