]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Revert "kdb: Remove all references to DOING_KGDB2"
authorStephen Rothwell <sfr@canb.auug.org.au>
Mon, 1 Aug 2011 04:08:27 +0000 (14:08 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 1 Aug 2011 04:08:27 +0000 (14:08 +1000)
This reverts commit 621ebf205b994af7998e6d2f9628f238998812c9.

kernel/debug/kdb/kdb_debugger.c
kernel/debug/kdb/kdb_io.c
kernel/debug/kdb/kdb_main.c
kernel/debug/kdb/kdb_private.h

index 8b68ce78ff170b8777be887a3bc8407c59863ba5..797fb21a13d0db12cdedd4306dc750baea72111d 100644 (file)
@@ -127,8 +127,10 @@ int kdb_stub(struct kgdb_state *ks)
        KDB_STATE_CLEAR(PAGER);
        kdbnearsym_cleanup();
        if (error == KDB_CMD_KGDB) {
-               if (KDB_STATE(DOING_KGDB))
+               if (KDB_STATE(DOING_KGDB) || KDB_STATE(DOING_KGDB2)) {
                        KDB_STATE_CLEAR(DOING_KGDB);
+                       KDB_STATE_CLEAR(DOING_KGDB2);
+               }
                return DBG_PASS_EVENT;
        }
        kdb_bp_install(ks->linux_regs);
index 0dbcdfbb6fd0ceab97d10faf2ac90cb5f470199e..bd233264b29f8ebbf7cb3af6e9ebc9aa9dce3c92 100644 (file)
@@ -399,7 +399,7 @@ poll_again:
                            strcmp(lastchar - 11, "$qSupported") == 0) {
                                kdb_gdb_state_pass(lastchar - 11);
                                strcpy(buffer, "kgdb");
-                               KDB_STATE_SET(DOING_KGDB);
+                               KDB_STATE_SET(DOING_KGDB2);
                                return buffer;
                        }
                }
index 63786e71a3cd9e1003a7a2bb6f399170f773756d..b33116ec9e6dc316e5899d6d6334a1025df2c522 100644 (file)
@@ -1386,7 +1386,7 @@ int kdb_main_loop(kdb_reason_t reason, kdb_reason_t reason2, int error,
                }
 
                if (result == KDB_CMD_KGDB) {
-                       if (!KDB_STATE(DOING_KGDB))
+                       if (!(KDB_STATE(DOING_KGDB) || KDB_STATE(DOING_KGDB2)))
                                kdb_printf("Entering please attach debugger "
                                           "or use $D#44+ or $3#33\n");
                        break;
index e381d105b40b827c71660d6f5265d197dba18c9f..03d332e63442803883fb77978311f6730f7b8db3 100644 (file)
@@ -21,6 +21,7 @@
 #define KDB_CMD_SS     (-1003)
 #define KDB_CMD_SSB    (-1004)
 #define KDB_CMD_KGDB (-1005)
+#define KDB_CMD_KGDB2 (-1006)
 
 /* Internal debug flags */
 #define KDB_DEBUG_FLAG_BP      0x0002  /* Breakpoint subsystem debug */
@@ -145,6 +146,7 @@ extern int kdb_state;
                                                 * keyboard on this cpu */
 #define KDB_STATE_KEXEC                0x00040000      /* kexec issued */
 #define KDB_STATE_DOING_KGDB   0x00080000      /* kgdb enter now issued */
+#define KDB_STATE_DOING_KGDB2  0x00100000      /* kgdb enter now issued */
 #define KDB_STATE_KGDB_TRANS   0x00200000      /* Transition to kgdb */
 #define KDB_STATE_ARCH         0xff000000      /* Reserved for arch
                                                 * specific use */