Skip to contentSkip to conversation

Fixed broken x86_64

DISCUSSION Amit S. Kale 1 participant 1 message Mar 4, 2004

lore
Share & tools
lore
#0 lore raw

Hi,

I am attempting to fix broken x86_64: kgdb_connected is zero when kgdb connects to gdb. This comes through a debug exception.

I am checking in this patch to fix it for uniprocessor systems. I still have to think about smp system.
-Amit

@@ -556,13 +566,15 @@
+{
+ struct die_args *d = ptr;
+
-+ if (!kgdb_connected || (cmd == DIE_DEBUG && user_mode(d->regs)))
++ if (cmd == DIE_DEBUG && user_mode(d->regs))
+ return NOTIFY_DONE;
+ if (cmd == DIE_NMI_IPI) {
-+ if (atomic_read(debugger_active))
++ if (atomic_read(&debugger_active))
+ return NOTIFY_BAD;
-+ } else if ((*linux_debug_hook)(d->trapnr, d->signr, d->err,
d->regs))
-+ return NOTIFY_BAD; /* skip */
++ } else {
++ CHK_DEBUGGER(d->trapnr, d->signr, d->err, d->regs,);
++ return NOTIFY_BAD;
++ }
+
+ return NOTIFY_DONE;
+}