Skip to content

Commit d613d82

Browse files
committed
kdb: Remove all references to DOING_KGDB2
The DOING_KGDB2 was originally a state variable for one of the two ways to automatically transition from kdb to kgdb. Purge all these variables and just use one single state for the transition. Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
1 parent f679c49 commit d613d82

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

kernel/debug/kdb/kdb_debugger.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,8 @@ int kdb_stub(struct kgdb_state *ks)
126126
KDB_STATE_CLEAR(PAGER);
127127
kdbnearsym_cleanup();
128128
if (error == KDB_CMD_KGDB) {
129-
if (KDB_STATE(DOING_KGDB) || KDB_STATE(DOING_KGDB2)) {
129+
if (KDB_STATE(DOING_KGDB))
130130
KDB_STATE_CLEAR(DOING_KGDB);
131-
KDB_STATE_CLEAR(DOING_KGDB2);
132-
}
133131
return DBG_PASS_EVENT;
134132
}
135133
kdb_bp_install(ks->linux_regs);

kernel/debug/kdb/kdb_io.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ static char *kdb_read(char *buffer, size_t bufsize)
399399
strcmp(lastchar - 11, "$qSupported") == 0) {
400400
kdb_gdb_state_pass(lastchar - 11);
401401
strcpy(buffer, "kgdb");
402-
KDB_STATE_SET(DOING_KGDB2);
402+
KDB_STATE_SET(DOING_KGDB);
403403
return buffer;
404404
}
405405
}

kernel/debug/kdb/kdb_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1386,7 +1386,7 @@ int kdb_main_loop(kdb_reason_t reason, kdb_reason_t reason2, int error,
13861386
}
13871387

13881388
if (result == KDB_CMD_KGDB) {
1389-
if (!(KDB_STATE(DOING_KGDB) || KDB_STATE(DOING_KGDB2)))
1389+
if (!KDB_STATE(DOING_KGDB))
13901390
kdb_printf("Entering please attach debugger "
13911391
"or use $D#44+ or $3#33\n");
13921392
break;

kernel/debug/kdb/kdb_private.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#define KDB_CMD_SS (-1003)
2222
#define KDB_CMD_SSB (-1004)
2323
#define KDB_CMD_KGDB (-1005)
24-
#define KDB_CMD_KGDB2 (-1006)
2524

2625
/* Internal debug flags */
2726
#define KDB_DEBUG_FLAG_BP 0x0002 /* Breakpoint subsystem debug */
@@ -146,7 +145,6 @@ extern int kdb_state;
146145
* keyboard on this cpu */
147146
#define KDB_STATE_KEXEC 0x00040000 /* kexec issued */
148147
#define KDB_STATE_DOING_KGDB 0x00080000 /* kgdb enter now issued */
149-
#define KDB_STATE_DOING_KGDB2 0x00100000 /* kgdb enter now issued */
150148
#define KDB_STATE_KGDB_TRANS 0x00200000 /* Transition to kgdb */
151149
#define KDB_STATE_ARCH 0xff000000 /* Reserved for arch
152150
* specific use */

0 commit comments

Comments
 (0)