The generic-experiment now learned to record and compare output on an arbitrary serial port. Using Bochs' port 0xe9 hack (parameter --e9-file) is kept for compatibility reasons. Change-Id: I5b1aa02d244e8b474919e1bdf043e523ea0e4f45
43 lines
853 B
C++
43 lines
853 B
C++
#ifndef __GENERIC_TRACING_HPP__
|
|
#define __GENERIC_TRACING_HPP__
|
|
|
|
#include "efw/ExperimentFlow.hpp"
|
|
#include "util/Logger.hpp"
|
|
#include "util/ElfReader.hpp"
|
|
#include "util/MemoryMap.hpp"
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
class GenericTracing : public fail::ExperimentFlow {
|
|
std::string start_symbol;
|
|
std::string stop_symbol;
|
|
|
|
fail::guest_address_t start_address;
|
|
fail::guest_address_t stop_address;
|
|
|
|
std::string state_file;
|
|
std::string trace_file;
|
|
std::string elf_file;
|
|
|
|
bool use_memory_map;
|
|
fail::MemoryMap traced_memory_map;
|
|
|
|
bool restore;
|
|
bool full_trace;
|
|
|
|
fail::guest_address_t serial_port;
|
|
std::string serial_file;
|
|
|
|
fail::Logger m_log;
|
|
fail::ElfReader *m_elf;
|
|
|
|
public:
|
|
void parseOptions();
|
|
bool run();
|
|
|
|
GenericTracing() : restore(false),
|
|
full_trace(false), m_log("GenericTracing", false) {}
|
|
};
|
|
|
|
#endif // __TRACING_TEST_HPP__
|