ptr = &remcomInBuffer[1];
if (kgdb_hex2long(&ptr, &addr))
linux_regs->ip = addr;
+ case 'D':
+ case 'k':
newPC = linux_regs->ip;
/* clear the trace bit */
if (kgdb_handle_exception(args->trapnr, args->signr, args->err, regs))
return NOTIFY_DONE;
+ /* Must touch watchdog before return to normal operation */
+ touch_nmi_watchdog();
return NOTIFY_STOP;
}
void __kprobes die_nmi(char *str, struct pt_regs *regs, int do_panic)
{
- unsigned long flags = oops_begin();
+ unsigned long flags;
+
+ if (notify_die(DIE_NMIWATCHDOG, str, regs, 0, 2, SIGINT) ==
+ NOTIFY_STOP)
+ return;
+ flags = oops_begin();
/*
* We are in trouble anyway, lets at least try
* to get a message out.
if (!CACHE_FLUSH_IS_SAFE)
return;
- if (current->mm) {
+ if (current->mm && current->mm->mmap_cache) {
flush_cache_range(current->mm->mmap_cache,
addr, addr + BREAK_INSTR_SIZE);
} else {
/* Clear memory breakpoints. */
for (i = 0; i < KGDB_MAX_BREAKPOINTS; i++) {
- if (kgdb_break[i].state != BP_SET)
- continue;
+ if (kgdb_break[i].state != BP_ACTIVE)
+ goto setundefined;
addr = kgdb_break[i].bpt_addr;
error = kgdb_arch_remove_breakpoint(addr,
kgdb_break[i].saved_instr);
if (error)
- return error;
- kgdb_break[i].state = BP_REMOVED;
+ printk(KERN_ERR "KGDB: breakpoint remove failed: %lx\n",
+ addr);
+setundefined:
+ kgdb_break[i].state = BP_UNDEFINED;
}
/* Clear hardware breakpoints. */
}
/**
- * kkgdb_register_io_module - register KGDB IO module
+ * kgdb_register_io_module - register KGDB IO module
* @new_kgdb_io_ops: the io ops vector
*
* Register it with the KGDB core.