X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Ftarget%2Farm_semihosting.c;h=9117a74426b056cbb487c4f1b969578dd5ea0657;hb=9f93cca42738cf0c5060296ef5899fee53fc642f;hp=31ca7792f26248baa45c18e2f40824209908a561;hpb=a7da117ad6bc1749863c14fdeef2bd4898620574;p=openocd.git diff --git a/src/target/arm_semihosting.c b/src/target/arm_semihosting.c index 31ca7792f2..9117a74426 100644 --- a/src/target/arm_semihosting.c +++ b/src/target/arm_semihosting.c @@ -82,6 +82,9 @@ static int post_result(struct target *target) { struct arm *arm = target_to_arm(target); + if (!target->semihosting) + return ERROR_FAIL; + /* REVISIT this looks wrong ... ARM11 and Cortex-A8 * should work this way at least sometimes. */