Sergei Shtylyov wrote: > Jason Wessel wrote: > >> This patch fixes some corner cases where KGDB will silently hang or >> kill the system, if a user accidentally tries to source step into a >> spin_unlock() call or source step in on a macro containing >> smp_processor_id(). The use of raw_smp_processor_id is desired in >> kernel/kgdb.c to fix this particular problem. > > Hmm, looks like it might fix the issues we also had, and even > render the patch which makes KGDB dependent on !DEBUG_PREEMPT (and > some others) unneeded... >
Which other parts did you think were not needed? It would be good to dump some of that. If this patch doesn't fix the !DEBUG_PREEMPT, perhaps the next one I am sending out about single stepping will fix it. If not can you provide me with a test case to see the problem? I had no intention of applying the !DEBUG_PREEMPT patch until I have enough information to reproduce the problem or characterization that adequately explains why it has no possibility to work. Ideally I would like to see the root cause identified so as to craft a solution. > Hm, I wonder whether the override will be needed for other > architectures... > Sure the x86_64 arch needs to change too, and the change below should address it. I don't know that any other arch has a special rewind that is needed. Signed-off-by: Jason Wessel <[EMAIL PROTECTED]> Index: linux-2.6.21-standard/arch/x86_64/kernel/kgdb.c =================================================================== --- linux-2.6.21-standard.orig/arch/x86_64/kernel/kgdb.c +++ linux-2.6.21-standard/arch/x86_64/kernel/kgdb.c @@ -325,6 +325,14 @@ int kgdb_skipexception(int exception, st return 0; } +unsigned long kgdb_arch_pc(int exception, struct pt_regs *regs) +{ + if (exception == 3) { + return instruction_pointer(regs) - 1; + } + return instruction_pointer(regs); +} + struct kgdb_arch arch_kgdb_ops = { .gdb_bpt_instr = {0xcc}, .flags = KGDB_HW_BREAKPOINT, ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Kgdb-bugreport mailing list Kgdb-bugreport@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport