debugfaults.hh (9414:88fa4031a9e3) debugfaults.hh (10292:933dfb9d8279)
1/*
2 * Copyright (c) 2010 Advanced Micro Devices, Inc.
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 98 unchanged lines hidden (view full) ---

107 }
108 }
109};
110
111template <int Func>
112class M5VarArgsFault : public M5DebugFault
113{
114 public:
1/*
2 * Copyright (c) 2010 Advanced Micro Devices, Inc.
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 98 unchanged lines hidden (view full) ---

107 }
108 }
109};
110
111template <int Func>
112class M5VarArgsFault : public M5DebugFault
113{
114 public:
115 M5VarArgsFault(const std::string &format, CPRINTF_DECLARATION) :
116 M5DebugFault((DebugFunc)Func, csprintf(format, VARARGS_ALLARGS))
115 template<typename ...Args>
116 M5VarArgsFault(const std::string &format, const Args &...args) :
117 M5DebugFault((DebugFunc)Func, csprintf(format, args...))
117 {}
118};
119
120typedef M5VarArgsFault<M5DebugFault::PanicFunc> M5PanicFault;
121typedef M5VarArgsFault<M5DebugFault::FatalFunc> M5FatalFault;
122typedef M5VarArgsFault<M5DebugFault::WarnFunc> M5WarnFault;
123typedef M5VarArgsFault<M5DebugFault::WarnOnceFunc> M5WarnOnceFault;
124
125} // namespace GenericISA
126
127#endif // __ARCH_GENERIC_DEBUGFAULTS_HH__
118 {}
119};
120
121typedef M5VarArgsFault<M5DebugFault::PanicFunc> M5PanicFault;
122typedef M5VarArgsFault<M5DebugFault::FatalFunc> M5FatalFault;
123typedef M5VarArgsFault<M5DebugFault::WarnFunc> M5WarnFault;
124typedef M5VarArgsFault<M5DebugFault::WarnOnceFunc> M5WarnOnceFault;
125
126} // namespace GenericISA
127
128#endif // __ARCH_GENERIC_DEBUGFAULTS_HH__