Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d613d828 authored by Jason Wessel's avatar Jason Wessel
Browse files

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: default avatarJason Wessel <jason.wessel@windriver.com>
parent f679c498
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -126,10 +126,8 @@ int kdb_stub(struct kgdb_state *ks)
	KDB_STATE_CLEAR(PAGER);
	kdbnearsym_cleanup();
	if (error == KDB_CMD_KGDB) {
		if (KDB_STATE(DOING_KGDB) || KDB_STATE(DOING_KGDB2)) {
		if (KDB_STATE(DOING_KGDB))
			KDB_STATE_CLEAR(DOING_KGDB);
			KDB_STATE_CLEAR(DOING_KGDB2);
		}
		return DBG_PASS_EVENT;
	}
	kdb_bp_install(ks->linux_regs);
+1 −1
Original line number Diff line number Diff line
@@ -399,7 +399,7 @@ static char *kdb_read(char *buffer, size_t bufsize)
			    strcmp(lastchar - 11, "$qSupported") == 0) {
				kdb_gdb_state_pass(lastchar - 11);
				strcpy(buffer, "kgdb");
				KDB_STATE_SET(DOING_KGDB2);
				KDB_STATE_SET(DOING_KGDB);
				return buffer;
			}
		}
+1 −1
Original line number Diff line number Diff line
@@ -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) || KDB_STATE(DOING_KGDB2)))
			if (!KDB_STATE(DOING_KGDB))
				kdb_printf("Entering please attach debugger "
					   "or use $D#44+ or $3#33\n");
			break;
+0 −2
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@
#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 */
@@ -146,7 +145,6 @@ 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 */