diff options
Diffstat (limited to 'kernel/debug/kdb/kdb_bp.c')
| -rw-r--r-- | kernel/debug/kdb/kdb_bp.c | 27 | 
1 files changed, 9 insertions, 18 deletions
diff --git a/kernel/debug/kdb/kdb_bp.c b/kernel/debug/kdb/kdb_bp.c index 20059ef4459..70a504601dc 100644 --- a/kernel/debug/kdb/kdb_bp.c +++ b/kernel/debug/kdb/kdb_bp.c @@ -153,6 +153,13 @@ static int _kdb_bp_install(struct pt_regs *regs, kdb_bp_t *bp)  	} else {  		kdb_printf("%s: failed to set breakpoint at 0x%lx\n",  			   __func__, bp->bp_addr); +#ifdef CONFIG_DEBUG_RODATA +		if (!bp->bp_type) { +			kdb_printf("Software breakpoints are unavailable.\n" +				   "  Change the kernel CONFIG_DEBUG_RODATA=n\n" +				   "  OR use hw breaks: help bph\n"); +		} +#endif  		return 1;  	}  	return 0; @@ -479,11 +486,9 @@ static int kdb_bc(int argc, const char **argv)  /*   * kdb_ss   * - *	Process the 'ss' (Single Step) and 'ssb' (Single Step to Branch) - *	commands. + *	Process the 'ss' (Single Step) command.   *   *	ss - *	ssb   *   * Parameters:   *	argc	Argument count @@ -491,35 +496,23 @@ static int kdb_bc(int argc, const char **argv)   * Outputs:   *	None.   * Returns: - *	KDB_CMD_SS[B] for success, a kdb error if failure. + *	KDB_CMD_SS for success, a kdb error if failure.   * Locking:   *	None.   * Remarks:   *   *	Set the arch specific option to trigger a debug trap after the next   *	instruction. - * - *	For 'ssb', set the trace flag in the debug trap handler - *	after printing the current insn and return directly without - *	invoking the kdb command processor, until a branch instruction - *	is encountered.   */  static int kdb_ss(int argc, const char **argv)  { -	int ssb = 0; - -	ssb = (strcmp(argv[0], "ssb") == 0);  	if (argc != 0)  		return KDB_ARGCOUNT;  	/*  	 * Set trace flag and go.  	 */  	KDB_STATE_SET(DOING_SS); -	if (ssb) { -		KDB_STATE_SET(DOING_SSB); -		return KDB_CMD_SSB; -	}  	return KDB_CMD_SS;  } @@ -554,8 +547,6 @@ void __init kdb_initbptab(void)  	kdb_register_repeat("ss", kdb_ss, "",  		"Single Step", 1, KDB_REPEAT_NO_ARGS); -	kdb_register_repeat("ssb", kdb_ss, "", -		"Single step to branch/call", 0, KDB_REPEAT_NO_ARGS);  	/*  	 * Architecture dependent initialization.  	 */  | 
