Merge pull request #137 from SuperHouse/feature/better_crash_dumps

Better crash dumps
This commit is contained in:
Angus Gratton 2016-05-17 09:38:19 +10:00
commit 3ba19d7c4e
19 changed files with 1013 additions and 664 deletions

View file

@ -305,7 +305,7 @@ static void test_system_interaction()
}
uint32_t ticks = xTaskGetTickCount() - start;
printf("Timer interaction test PASSED after %dms.\n", ticks*portTICK_RATE_MS);
while(1) {}
abort();
}
/* The following "sanity tests" are designed to try to execute every code path

View file

@ -115,7 +115,7 @@ void http_get_task(void *pvParameters)
strlen(pers))) != 0)
{
printf(" failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret);
while(1) {} /* todo: replace with abort() */
abort();
}
printf(" ok\n");
@ -129,7 +129,7 @@ void http_get_task(void *pvParameters)
if(ret < 0)
{
printf(" failed\n ! mbedtls_x509_crt_parse returned -0x%x\n\n", -ret);
while(1) {} /* todo: replace with abort() */
abort();
}
printf(" ok (%d skipped)\n", ret);
@ -138,7 +138,7 @@ void http_get_task(void *pvParameters)
if((ret = mbedtls_ssl_set_hostname(&ssl, WEB_SERVER)) != 0)
{
printf(" failed\n ! mbedtls_ssl_set_hostname returned %d\n\n", ret);
while(1) {} /* todo: replace with abort() */
abort();
}
/*

View file

@ -85,7 +85,7 @@ void tls_server_task(void *pvParameters)
strlen(pers))) != 0)
{
printf(" failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret);
while(1) {} /* todo: replace with abort() */
abort();
}
printf(" ok\n");
@ -99,7 +99,7 @@ void tls_server_task(void *pvParameters)
if(ret < 0)
{
printf(" failed\n ! mbedtls_x509_crt_parse returned -0x%x\n\n", -ret);
while(1) {} /* todo: replace with abort() */
abort();
}
printf(" ok (%d skipped)\n", ret);
@ -109,7 +109,7 @@ void tls_server_task(void *pvParameters)
if(ret != 0)
{
printf(" failed\n ! mbedtls_pk_parse_key returned - 0x%x\n\n", -ret);
while(1) { } /*todo: replace with abort() */
abort();
}
printf(" ok\n");
@ -134,7 +134,7 @@ void tls_server_task(void *pvParameters)
if( ( ret = mbedtls_ssl_conf_own_cert( &conf, &srvcert, &pkey ) ) != 0 )
{
printf( " failed\n ! mbedtls_ssl_conf_own_cert returned %d\n\n", ret );
while(1) { }
abort();
}
mbedtls_ssl_conf_rng(&conf, mbedtls_ctr_drbg_random, &ctr_drbg);