summaryrefslogtreecommitdiff
path: root/rtld-base.ini
blob: 3293ea8a9d98819f683ec6239542ea8347ad1366 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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>"