SCP: Fix help to only display breakpoint help for the proper device or CPU

This commit is contained in:
Mark Pizzolato 2016-11-02 01:44:55 -07:00
parent b8842e40e5
commit f30de55f18

16
scp.c
View file

@ -2440,7 +2440,7 @@ BRKTYPTAB *brkt = dptr->brk_types;
char gbuf[CBUFSIZE]; char gbuf[CBUFSIZE];
if (sim_brk_types == 0) { if (sim_brk_types == 0) {
if (!silent) { if ((dptr != sim_dflt_dev) && (!silent)) {
fprintf (st, "Breakpoints are not supported in the %s simulator\n", sim_name); fprintf (st, "Breakpoints are not supported in the %s simulator\n", sim_name);
if (dptr->help) if (dptr->help)
dptr->help (st, dptr, NULL, 0, NULL); dptr->help (st, dptr, NULL, 0, NULL);
@ -2450,14 +2450,16 @@ if (sim_brk_types == 0) {
if (brkt == NULL) { if (brkt == NULL) {
int i; int i;
if (sim_brk_types & ~sim_brk_dflt) { if (dptr == sim_dflt_dev) {
fprintf (st, "%s supports the following breakpoint types:\n", sim_dname (dptr)); if (sim_brk_types & ~sim_brk_dflt) {
for (i=0; i<26; i++) { fprintf (st, "%s supports the following breakpoint types:\n", sim_dname (dptr));
if (sim_brk_types & (1<<i)) for (i=0; i<26; i++) {
fprintf (st, " -%c\n", 'A'+i); if (sim_brk_types & (1<<i))
fprintf (st, " -%c\n", 'A'+i);
}
} }
fprintf (st, "The default breakpoint type is: %s\n", put_switches (gbuf, sizeof(gbuf), sim_brk_dflt));
} }
fprintf (st, "The default breakpoint type is: %s\n", put_switches (gbuf, sizeof(gbuf), sim_brk_dflt));
return; return;
} }
fprintf (st, "%s supports the following breakpoint types:\n", sim_dname (dptr)); fprintf (st, "%s supports the following breakpoint types:\n", sim_dname (dptr));