diff options
Diffstat (limited to 'lib/ccdbg-command.c')
| -rw-r--r-- | lib/ccdbg-command.c | 9 | 
1 files changed, 8 insertions, 1 deletions
| diff --git a/lib/ccdbg-command.c b/lib/ccdbg-command.c index 2b29fdee..d99e8ff3 100644 --- a/lib/ccdbg-command.c +++ b/lib/ccdbg-command.c @@ -70,7 +70,14 @@ ccdbg_rd_config(struct ccdbg *dbg)  uint16_t  ccdbg_get_pc(struct ccdbg *dbg)  { -	return ccdbg_cmd_write_read16(dbg, CC_GET_PC, NULL, 0); +	uint16_t	pc1, pc2; + +	pc1 = ccdbg_cmd_write_read16(dbg, CC_GET_PC, NULL, 0); +	pc2 = ccdbg_cmd_write_read16(dbg, CC_GET_PC, NULL, 0); +	if (pc1 != pc2) +		fprintf (stderr, "Invalid pc %04x != %04x\n", +			 pc1, pc2); +	return pc2;  }  uint8_t | 
