#ifndef __CPU_NATIVETRACE_HH__
#define __CPU_NATIVETRACE_HH__
-#include <errno.h>
#include <unistd.h>
+#include <cerrno>
+
#include "base/socket.hh"
#include "base/trace.hh"
#include "base/types.hh"
public:
NativeTraceRecord(NativeTrace * _parent,
Tick _when, ThreadContext *_thread,
- const StaticInstPtr _staticInst, Addr _pc, bool spec,
- const StaticInstPtr _macroStaticInst = NULL, MicroPC _upc = 0)
- : ExeTracerRecord(_when, _thread, _staticInst, _pc, spec,
- _macroStaticInst, _upc),
+ const StaticInstPtr _staticInst, TheISA::PCState _pc,
+ const StaticInstPtr _macroStaticInst = NULL)
+ : ExeTracerRecord(_when, _thread, _staticInst, _pc, _macroStaticInst),
parent(_parent)
{
}
NativeTraceRecord *
getInstRecord(Tick when, ThreadContext *tc,
- const StaticInstPtr staticInst, Addr pc,
- const StaticInstPtr macroStaticInst = NULL, MicroPC upc = 0)
+ const StaticInstPtr staticInst, TheISA::PCState pc,
+ const StaticInstPtr macroStaticInst = NULL)
{
- if (tc->misspeculating())
- return NULL;
-
return new NativeTraceRecord(this, when, tc,
- staticInst, pc, tc->misspeculating(), macroStaticInst, upc);
+ staticInst, pc, macroStaticInst);
}
template<class T>
bool
checkReg(const char * regName, T &val, T &realVal)
{
- if(val != realVal)
+ if (val != realVal)
{
DPRINTFN("Register %s should be %#x but is %#x.\n",
regName, realVal, val);
{
size_t soFar = 0;
while (soFar < size) {
- size_t res = ::read(fd, (uint8_t *)ptr + soFar, size - soFar);
+ ssize_t res = ::read(fd, (uint8_t *)ptr + soFar, size - soFar);
if (res < 0)
panic("Read call failed! %s\n", strerror(errno));
else
check(NativeTraceRecord *record) = 0;
};
-} /* namespace Trace */
+} // namespace Trace
#endif // __CPU_NATIVETRACE_HH__