Commit abb90ee7 authored by Michael Ellerman's avatar Michael Ellerman

powerpc/xmon: Cleanup the breakpoint flags

Drop BP_IABR_TE, which though used, does not do anything useful. Rename
BP_IABR to BP_CIABR. Renumber the flags.
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 1ad7d705
...@@ -94,10 +94,9 @@ struct bpt { ...@@ -94,10 +94,9 @@ struct bpt {
}; };
/* Bits in bpt.enabled */ /* Bits in bpt.enabled */
#define BP_IABR_TE 1 /* IABR translation enabled */ #define BP_CIABR 1
#define BP_IABR 2 #define BP_TRAP 2
#define BP_TRAP 8 #define BP_DABR 4
#define BP_DABR 0x10
#define NBPTS 256 #define NBPTS 256
static struct bpt bpts[NBPTS]; static struct bpt bpts[NBPTS];
...@@ -772,7 +771,7 @@ static void insert_bpts(void) ...@@ -772,7 +771,7 @@ static void insert_bpts(void)
bp = bpts; bp = bpts;
for (i = 0; i < NBPTS; ++i, ++bp) { for (i = 0; i < NBPTS; ++i, ++bp) {
if ((bp->enabled & (BP_TRAP|BP_IABR)) == 0) if ((bp->enabled & (BP_TRAP|BP_CIABR)) == 0)
continue; continue;
if (mread(bp->address, &bp->instr[0], 4) != 4) { if (mread(bp->address, &bp->instr[0], 4) != 4) {
printf("Couldn't read instruction at %lx, " printf("Couldn't read instruction at %lx, "
...@@ -787,7 +786,7 @@ static void insert_bpts(void) ...@@ -787,7 +786,7 @@ static void insert_bpts(void)
continue; continue;
} }
store_inst(&bp->instr[0]); store_inst(&bp->instr[0]);
if (bp->enabled & BP_IABR) if (bp->enabled & BP_CIABR)
continue; continue;
if (mwrite(bp->address, &bpinstr, 4) != 4) { if (mwrite(bp->address, &bpinstr, 4) != 4) {
printf("Couldn't write instruction at %lx, " printf("Couldn't write instruction at %lx, "
...@@ -822,7 +821,7 @@ static void remove_bpts(void) ...@@ -822,7 +821,7 @@ static void remove_bpts(void)
bp = bpts; bp = bpts;
for (i = 0; i < NBPTS; ++i, ++bp) { for (i = 0; i < NBPTS; ++i, ++bp) {
if ((bp->enabled & (BP_TRAP|BP_IABR)) != BP_TRAP) if ((bp->enabled & (BP_TRAP|BP_CIABR)) != BP_TRAP)
continue; continue;
if (mread(bp->address, &instr, 4) == 4 if (mread(bp->address, &instr, 4) == 4
&& instr == bpinstr && instr == bpinstr
...@@ -1217,7 +1216,7 @@ bpt_cmds(void) ...@@ -1217,7 +1216,7 @@ bpt_cmds(void)
break; break;
} }
if (iabr) { if (iabr) {
iabr->enabled &= ~(BP_IABR | BP_IABR_TE); iabr->enabled &= ~BP_CIABR;
iabr = NULL; iabr = NULL;
} }
if (!scanhex(&a)) if (!scanhex(&a))
...@@ -1226,7 +1225,7 @@ bpt_cmds(void) ...@@ -1226,7 +1225,7 @@ bpt_cmds(void)
break; break;
bp = new_breakpoint(a); bp = new_breakpoint(a);
if (bp != NULL) { if (bp != NULL) {
bp->enabled |= BP_IABR | BP_IABR_TE; bp->enabled |= BP_CIABR;
iabr = bp; iabr = bp;
} }
break; break;
...@@ -1283,7 +1282,7 @@ bpt_cmds(void) ...@@ -1283,7 +1282,7 @@ bpt_cmds(void)
if (!bp->enabled) if (!bp->enabled)
continue; continue;
printf("%2x %s ", BP_NUM(bp), printf("%2x %s ", BP_NUM(bp),
(bp->enabled & BP_IABR)? "inst": "trap"); (bp->enabled & BP_CIABR) ? "inst": "trap");
xmon_print_symbol(bp->address, " ", "\n"); xmon_print_symbol(bp->address, " ", "\n");
} }
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment