#define TRIGGER_ENABLE
#define TRIGGER_NIA 0xa580
#define TRIGGER_INSN 0xe8628008
+#define TRIGGER_COUNTDOWN 200000
//#define TRIGGER_NIA 0x335c
//#define TRIGGER_INSN 0x3c400001
// trace conditions
bool traceme = true;
+ int trigger_countdown = TRIGGER_COUNTDOWN;
#ifdef TRIGGER_ENABLE
traceme = false;
#endif
traceme = true;
fprintf(dump, "trace trigger enabled\n");
}
+ // tracing active for only TRIGGER_COUNTDOWN cycles
+ if (traceme) {
+ trigger_countdown--;
+ if (trigger_countdown == 0) {
+ traceme = false;
+ }
+ }
#endif
fprintf(dump, "pc %8x insn %8x msr %16lx",
top->nia, top->insn, top->msr_o);