Adds better support to debug generated code
The commit adds to the generate_code.pl script support to add #line directives
to generated code to allow build breaks to be more easily found from the
generated code.
diff --git a/tests/suites/helpers.function b/tests/suites/helpers.function
index 6d4438d..c4128b4 100644
--- a/tests/suites/helpers.function
+++ b/tests/suites/helpers.function
@@ -1,3 +1,4 @@
+#line 1 "helpers.function"
/*----------------------------------------------------------------------------*/
/* Headers */
diff --git a/tests/suites/main_test.function b/tests/suites/main_test.function
index c2e3f6b..c5d6cd8 100644
--- a/tests/suites/main_test.function
+++ b/tests/suites/main_test.function
@@ -1,3 +1,4 @@
+#line 1 "main_test.function"
SUITE_PRE_DEP
#define TEST_SUITE_ACTIVE
@@ -70,6 +71,8 @@
FUNCTION_CODE
SUITE_POST_DEP
+#line !LINE_NO! "main_test.function"
+
/*----------------------------------------------------------------------------*/
/* Test dispatch code */
@@ -111,6 +114,8 @@
/*----------------------------------------------------------------------------*/
/* Main Test code */
+#line !LINE_NO! "main_test.function"
+
#define USAGE \
"Usage: %s [OPTIONS] files...\n\n" \
" Command line arguments:\n" \
@@ -121,7 +126,7 @@
" -v | --verbose Display full information about each test\n" \
" -h | --help Display this information\n\n", \
argv[0], \
- "TEST_FILENAME"
+ "TESTCASE_FILENAME"
int get_line( FILE *f, char *buf, size_t len )
@@ -234,7 +239,7 @@
int main(int argc, const char *argv[])
{
/* Local Configurations and options */
- const char *default_filename = "TEST_FILENAME";
+ const char *default_filename = "TESTCASE_FILENAME";
const char *test_filename = NULL;
const char **test_files = NULL;
int testfile_count = 0;