powerpc: Update xmon to use ppc_breakpoint_available()

The 'bd' command will now print an error and not set the breakpoint on
P9.

Signed-off-by: Michael Neuling <mikey@neuling.org>
[mpe: Unsplit quoted string]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
Michael Neuling 2018-03-27 15:37:19 +11:00 committed by Michael Ellerman
parent 85ce9a5d57
commit 9bc2bd5d9d
1 changed files with 4 additions and 0 deletions

View File

@ -1297,6 +1297,10 @@ bpt_cmds(void)
static const char badaddr[] = "Only kernel addresses are permitted for breakpoints\n";
int mode;
case 'd': /* bd - hardware data breakpoint */
if (!ppc_breakpoint_available()) {
printf("Hardware data breakpoint not supported on this cpu\n");
break;
}
mode = 7;
cmd = inchar();
if (cmd == 'r')