forked from Imagelibrary/rtems
score: Change debug helper functions
Rename rtems_internal_error_description() to rtems_internal_error_text(). Rename rtems_fatal_source_description() to rtems_fatal_source_text(). Rename rtems_status_code_description() to rtems_status_text(). Remove previous implementation of rtems_status_text().
This commit is contained in:
@@ -65,7 +65,7 @@ char *Errors_Rtems[] = {
|
||||
void Put_Error( uint32_t source, uint32_t error )
|
||||
{
|
||||
if ( source == INTERNAL_ERROR_CORE ) {
|
||||
printk( rtems_internal_error_description( error ) );
|
||||
printk( rtems_internal_error_text( error ) );
|
||||
}
|
||||
else if (source == INTERNAL_ERROR_RTEMS_API ){
|
||||
if (error > RTEMS_NOT_IMPLEMENTED )
|
||||
@@ -80,7 +80,7 @@ void Put_Error( uint32_t source, uint32_t error )
|
||||
|
||||
void Put_Source( rtems_fatal_source source )
|
||||
{
|
||||
printk( "%s", rtems_fatal_source_description( source ) );
|
||||
printk( "%s", rtems_fatal_source_text( source ) );
|
||||
}
|
||||
|
||||
void Fatal_extension(
|
||||
|
||||
@@ -65,7 +65,7 @@ char *Errors_Rtems[] = {
|
||||
void Put_Error( uint32_t source, uint32_t error )
|
||||
{
|
||||
if ( source == INTERNAL_ERROR_CORE ) {
|
||||
printk( rtems_internal_error_description( error ) );
|
||||
printk( rtems_internal_error_text( error ) );
|
||||
}
|
||||
else if (source == INTERNAL_ERROR_RTEMS_API ){
|
||||
if (error > RTEMS_NOT_IMPLEMENTED )
|
||||
@@ -77,7 +77,7 @@ void Put_Error( uint32_t source, uint32_t error )
|
||||
|
||||
void Put_Source( rtems_fatal_source source )
|
||||
{
|
||||
printk( "%s", rtems_fatal_source_description( source ) );
|
||||
printk( "%s", rtems_fatal_source_text( source ) );
|
||||
}
|
||||
|
||||
static bool is_expected_error( rtems_fatal_code error )
|
||||
|
||||
@@ -20,50 +20,50 @@
|
||||
|
||||
#include <rtems.h>
|
||||
|
||||
static void test_internal_error_description(void)
|
||||
static void test_internal_error_text(void)
|
||||
{
|
||||
rtems_fatal_code error = 0;
|
||||
const char *desc = NULL;
|
||||
const char *desc_last;
|
||||
const char *text = NULL;
|
||||
const char *text_last;
|
||||
|
||||
do {
|
||||
desc_last = desc;
|
||||
desc = rtems_internal_error_description( error );
|
||||
text_last = text;
|
||||
text = rtems_internal_error_text( error );
|
||||
++error;
|
||||
puts( desc );
|
||||
} while ( desc != desc_last );
|
||||
puts( text );
|
||||
} while ( text != text_last );
|
||||
|
||||
rtems_test_assert( error - 3 == INTERNAL_ERROR_CPU_ISR_INSTALL_VECTOR );
|
||||
}
|
||||
|
||||
static void test_fatal_source_description(void)
|
||||
static void test_fatal_source_text(void)
|
||||
{
|
||||
rtems_fatal_source source = 0;
|
||||
const char *desc = NULL;
|
||||
const char *desc_last;
|
||||
const char *text = NULL;
|
||||
const char *text_last;
|
||||
|
||||
do {
|
||||
desc_last = desc;
|
||||
desc = rtems_fatal_source_description( source );
|
||||
text_last = text;
|
||||
text = rtems_fatal_source_text( source );
|
||||
++source;
|
||||
puts( desc );
|
||||
} while ( desc != desc_last );
|
||||
puts( text );
|
||||
} while ( text != text_last );
|
||||
|
||||
rtems_test_assert( source - 3 == RTEMS_FATAL_SOURCE_EXCEPTION );
|
||||
}
|
||||
|
||||
static void test_status_code_description(void)
|
||||
static void test_status_text(void)
|
||||
{
|
||||
rtems_status_code code = 0;
|
||||
const char *desc = NULL;
|
||||
const char *desc_last;
|
||||
const char *text = NULL;
|
||||
const char *text_last;
|
||||
|
||||
do {
|
||||
desc_last = desc;
|
||||
desc = rtems_status_code_description( code );
|
||||
text_last = text;
|
||||
text = rtems_status_text( code );
|
||||
++code;
|
||||
puts( desc );
|
||||
} while ( desc != desc_last );
|
||||
puts( text );
|
||||
} while ( text != text_last );
|
||||
|
||||
rtems_test_assert( code - 3 == RTEMS_PROXY_BLOCKING );
|
||||
}
|
||||
@@ -72,9 +72,9 @@ static void Init(rtems_task_argument arg)
|
||||
{
|
||||
puts("\n\n*** TEST SPINTERNALERROR 2 ***");
|
||||
|
||||
test_internal_error_description();
|
||||
test_fatal_source_description();
|
||||
test_status_code_description();
|
||||
test_internal_error_text();
|
||||
test_fatal_source_text();
|
||||
test_status_text();
|
||||
|
||||
puts("*** END OF TEST SPINTERNALERROR 2 ***");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user