kgdb: continue and warn on signal passing from gdb
authorJason Wessel <jason.wessel@windriver.com>
Mon, 27 Apr 2009 18:20:21 +0000 (13:20 -0500)
committerJason Wessel <jason.wessel@windriver.com>
Fri, 11 Dec 2009 14:43:19 +0000 (08:43 -0600)
On some architectures for the segv trap, gdb wants to pass the signal
back on continue.  For kgdb this is not the default behavior, because
it can cause the kernel to crash if you arbitrarily pass back a
exception outside of kgdb.

Instead of causing instability, pass a message back to gdb about the
supported kgdb signal passing and execute a standard kgdb continue
operation.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
kernel/kgdb.c

index ca21fe98e8de8d1ec6d24a5b14a1ba7cbe2cd193..8584eac55e30bb6b5fcb4a5661905a3f882c93ed 100644 (file)
@@ -1210,8 +1210,10 @@ static int gdb_cmd_exception_pass(struct kgdb_state *ks)
                return 1;
 
        } else {
-               error_packet(remcom_out_buffer, -EINVAL);
-               return 0;
+               kgdb_msg_write("KGDB only knows signal 9 (pass)"
+                       " and 15 (pass and disconnect)\n"
+                       "Executing a continue without signal passing\n", 0);
+               remcom_in_buffer[0] = 'c';
        }
 
        /* Indicate fall through */