diff options
Diffstat (limited to 'linkers/rtld-base.ini')
-rw-r--r-- | linkers/rtld-base.ini | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/linkers/rtld-base.ini b/linkers/rtld-base.ini new file mode 100644 index 0000000..b574e0b --- /dev/null +++ b/linkers/rtld-base.ini @@ -0,0 +1,36 @@ +; +; RTEMS Trace Linker Base configuration. +; +; Copyright 2014 Chris Johns <chrisj@rtems.org> +; + +; +; The default generartor is used if a function set does provide a generator record. +; +[default-generator] +generator = printf-generator + +; +; A printf generator prints to stdout the trace functions. +; +[printf-generator] +map-sym-prefix = rtld_pg__ +headers = printf-generator-headers +arg-trace = "rtld_pg_print_arg(@ARG_NUM@, @ARG_TYPE@, @ARG_SIZE@, &@ARG_LABEL@);" +ret-trace = "rtld_pg_print_ret(@RET_TYPE@, @RETG_SIZE@, &@RET_LABEL@);" +code = <<<CODE +static inline void rtld_pg_print_arg(int arg_num, + const char* arg_type, + int arg_size, + void* arg +{ + const char* p = arg; + int i; + printf (" %2d] %s(%d) = ", arg_num, arg_type, arg_size); + for (i = 0; i < arg_size; ++i, ++p) printf ("%02x", (unsigned int) *p); + printf ("\n"); +} +CODE + +[printf-generator-headers] +header = "#include <stdio.h>" |