From 9fa07f6b311d7950e259b018293512dc4e9e3637 Mon Sep 17 00:00:00 2001 From: Jason Wessel Date: Fri, 2 Apr 2010 11:57:18 -0500 Subject: [PATCH] --- yaml --- r: 189395 b: refs/heads/master c: 4da75b9ceac6939cd76830ec9581bef5bb398ad3 h: refs/heads/master i: 189393: 8c6887bf8b9783f3a59a3fcdaae25cafeeedc598 189391: 7867cd30c2ec638d4126a3cde1610377f90cac5b v: v3 --- [refs] | 2 +- trunk/kernel/kgdb.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 47bc878720ab..d5c5a8372c8c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ae6bf53e0255c8ab04b6fe31806e318432570e3c +refs/heads/master: 4da75b9ceac6939cd76830ec9581bef5bb398ad3 diff --git a/trunk/kernel/kgdb.c b/trunk/kernel/kgdb.c index 2f7f454605c2..11f3515ca83f 100644 --- a/trunk/kernel/kgdb.c +++ b/trunk/kernel/kgdb.c @@ -1365,6 +1365,7 @@ static int kgdb_cpu_enter(struct kgdb_state *ks, struct pt_regs *regs) int sstep_tries = 100; int error = 0; int i, cpu; + int trace_on = 0; acquirelock: /* * Interrupts will be restored by the 'trap return' code, except when @@ -1399,6 +1400,8 @@ static int kgdb_cpu_enter(struct kgdb_state *ks, struct pt_regs *regs) */ if (arch_kgdb_ops.correct_hw_break) arch_kgdb_ops.correct_hw_break(); + if (trace_on) + tracing_on(); atomic_dec(&cpu_in_kgdb[cpu]); touch_softlockup_watchdog_sync(); clocksource_touch_watchdog(); @@ -1474,6 +1477,9 @@ static int kgdb_cpu_enter(struct kgdb_state *ks, struct pt_regs *regs) kgdb_single_step = 0; kgdb_contthread = current; exception_level = 0; + trace_on = tracing_is_on(); + if (trace_on) + tracing_off(); /* Talk to debugger with gdbserial protocol */ error = gdb_serial_stub(ks); @@ -1505,6 +1511,8 @@ static int kgdb_cpu_enter(struct kgdb_state *ks, struct pt_regs *regs) else kgdb_sstep_pid = 0; } + if (trace_on) + tracing_on(); /* Free kgdb_active */ atomic_set(&kgdb_active, -1); touch_softlockup_watchdog_sync();