diff --git a/jtag/ChangeLog b/jtag/ChangeLog index 817f4be9..560a8486 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,3 +1,8 @@ +2003-09-10 Marcel Telka + + * src/cmd/dr.c (cmd_dr_run): Added test for missing active instruction and data register (thanks to + Mike Tesch for reporting). + 2003-09-10 Marcel Telka * src/bus/bcm1250.c (bcm1250_bus_printinfo, bcm1250_bus): Fixed typo (compatibile->compatible) in diff --git a/jtag/THANKS b/jtag/THANKS index 95e640ac..d23aa151 100644 --- a/jtag/THANKS +++ b/jtag/THANKS @@ -16,6 +16,7 @@ Guennadi Liakhovetski Brad Parker Christian Pellegrin Ramses VI +Mike Tesch Holger Schurig Matan Ziv-Av Alessandro Zummo diff --git a/jtag/src/cmd/dr.c b/jtag/src/cmd/dr.c index 36e0592f..655d86a5 100644 --- a/jtag/src/cmd/dr.c +++ b/jtag/src/cmd/dr.c @@ -50,7 +50,7 @@ cmd_dr_run( char *params[] ) } if (chain->active_part >= chain->parts->len) { - printf( _("%s: no active part\n"), "part" ); + printf( _("%s: no active part\n"), "dr" ); return 1; } @@ -63,6 +63,15 @@ cmd_dr_run( char *params[] ) return -1; } + if (chain->parts->parts[chain->active_part]->active_instruction == NULL) { + printf( _("%s: part without active instruction\n"), "dr" ); + return 1; + } + if (chain->parts->parts[chain->active_part]->active_instruction->data_register == NULL) { + printf( _("%s: part without active data register\n"), "dr" ); + return 1; + } + if (dir) r = chain->parts->parts[chain->active_part]->active_instruction->data_register->out; else