47a48,49
> typedef GenericISA::M5DebugFault::DebugFunc DebugFunc;
> DebugFunc func;
52c54
< MicroDebugBase(ExtMachInst _machInst, const char * mnem,
---
> MicroDebugBase(ExtMachInst machInst, const char * mnem,
54c56,59
< std::string _message, uint8_t _cc);
---
> DebugFunc _func, std::string _message, uint8_t _cc) :
> X86MicroopBase(machInst, mnem, instMnem, setFlags, No_OpClass),
> func(_func), message(_message), cc(_cc)
> {}
56,57c61,70
< std::string generateDisassembly(Addr pc,
< const SymbolTable *symtab) const;
---
> std::string
> generateDisassembly(Addr pc, const SymbolTable *symtab) const
> {
> std::stringstream response;
>
> printMnemonic(response, instMnem, mnemonic);
> response << "\"" << message << "\"";
>
> return response.str();
> }
73c86,87
< Fault %(class_name)s::execute(%(CPU_exec_context)s *xc,
---
> Fault
> %(class_name)s::execute(%(CPU_exec_context)s *xc,
79c93,95
< %(func)s("%s\n", message);
---
> return new GenericISA::M5DebugFault(func, message);
> } else {
> return NoFault;
81d96
< return NoFault;
85,95d99
< output decoder {{
< inline MicroDebugBase::MicroDebugBase(
< ExtMachInst machInst, const char * mnem, const char * instMnem,
< uint64_t setFlags, std::string _message, uint8_t _cc) :
< X86MicroopBase(machInst, mnem, instMnem,
< setFlags, No_OpClass),
< message(_message), cc(_cc)
< {
< }
< }};
<
101c105
< setFlags, _message, _cc)
---
> setFlags, %(func_num)s, _message, _cc)
107,119d110
< output decoder {{
< std::string MicroDebugBase::generateDisassembly(Addr pc,
< const SymbolTable *symtab) const
< {
< std::stringstream response;
<
< printMnemonic(response, instMnem, mnemonic);
< response << "\"" << message << "\"";
<
< return response.str();
< }
< }};
<
145c136
< def buildDebugMicro(func):
---
> def buildDebugMicro(func, func_num):
151a143
> "func_num": "GenericISA::M5DebugFault::%s" % func_num,
160a153
> "func_num": "GenericISA::M5DebugFault::%s" % func_num,
172,175c165,168
< buildDebugMicro("panic")
< buildDebugMicro("fatal")
< buildDebugMicro("warn")
< buildDebugMicro("warn_once")
---
> buildDebugMicro("panic", "PanicFunc")
> buildDebugMicro("fatal", "FatalFunc")
> buildDebugMicro("warn", "WarnFunc")
> buildDebugMicro("warn_once", "WarnOnceFunc")