Changeset 5025439 in rtems-tools for linkers/rtld-base.ini


Ignore:
Timestamp:
Sep 21, 2014, 4:24:37 AM (5 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, master
Children:
6ae559c
Parents:
149a8a6
Message:

rtems-tld: Add config options, fix void args, and SCore traces.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • linkers/rtld-base.ini

    r149a8a6 r5025439  
    1111generator = printf-generator
    1212
    13 ;
    14 ; A printf generator prints to stdout the trace functions.
    15 ;
    16 [printf-generator]
    17 headers = printf-generator-headers
    18 entry-trace = "rtld_pg_printf_entry(@FUNC_NAME@, (void*) &@FUNC_LABEL@);"
    19 arg-trace = "rtld_pg_printf_arg(@ARG_NUM@, @ARG_TYPE@, @ARG_SIZE@, (void*) &@ARG_LABEL@);"
    20 exit-trace = "rtld_pg_printf_exit(@FUNC_NAME@, (void*) &@FUNC_LABEL@);"
    21 ret-trace = "rtld_pg_printf_ret(@RET_TYPE@, @RET_SIZE@, (void*) &@RET_LABEL@);"
    22 code = <<<CODE
    23 static inline void rtld_pg_printf_entry(const char* func_name,
    24                                         void*       func_addr)
    25 {
    26   printf (" >> %s (0x%08x)\n", func_name, func_addr);
    27 }
    28 static inline void rtld_pg_printf_arg(int         arg_num,
    29                                       const char* arg_type,
    30                                       int         arg_size,
    31                                       void*       arg)
    32 {
    33   const unsigned char* p = arg;
    34   int   i;
    35   printf (" %2d] %s(%d) = ", arg_num, arg_type, arg_size);
    36   for (i = 0; i < arg_size; ++i, ++p) printf ("%02x", (unsigned int) *p);
    37   printf ("\n");
    38 }
    39 static inline void rtld_pg_printf_exit(const char* func_name,
    40                                        void*       func_addr)
    41 {
    42   printf (" << %s (0x%08x)\n", func_name, func_addr);
    43 }
    44 static inline void rtld_pg_printf_ret(const char* ret_type,
    45                                       int         ret_size,
    46                                       void*       ret)
    47 {
    48   const unsigned char* p = ret;
    49   int   i;
    50   printf (" rt] %s(%d) = ", ret_type, ret_size);
    51   for (i = 0; i < ret_size; ++i, ++p) printf ("%02x", (unsigned int) *p);
    52   printf ("\n");
    53 }
    54 CODE
    55 
    56 [printf-generator-headers]
    57 header = "#include <stdio.h>"
    58 
    59 [printk-generator]
    60 headers = printk-generator-headers
    61 entry-trace = "rtld_pg_printk_entry(@FUNC_NAME@, (void*) &@FUNC_LABEL@);"
    62 arg-trace = "rtld_pg_printk_arg(@ARG_NUM@, @ARG_TYPE@, @ARG_SIZE@, (void*) &@ARG_LABEL@);"
    63 exit-trace = "rtld_pg_printk_exit(@FUNC_NAME@, (void*) &@FUNC_LABEL@);"
    64 ret-trace = "rtld_pg_printk_ret(@RET_TYPE@, @RET_SIZE@, (void*) &@RET_LABEL@);"
    65 code = <<<CODE
    66 static inline void rtld_pg_printk_entry(const char* func_name,
    67                                         void*       func_addr)
    68 {
    69   printk (" >> %s (0x%08x)\n", func_name, func_addr);
    70 }
    71 static inline void rtld_pg_printk_arg(int         arg_num,
    72                                      const char* arg_type,
    73                                      int         arg_size,
    74                                      void*       arg)
    75 {
    76   const unsigned char* p = arg;
    77   int   i;
    78   printk (" %2d] %s(%d) = ", arg_num, arg_type, arg_size);
    79   for (i = 0; i < arg_size; ++i, ++p) printk ("%02x", (unsigned int) *p);
    80   printk ("\n");
    81 }
    82 static inline void rtld_pg_printk_exit(const char* func_name,
    83                                        void*       func_addr)
    84 {
    85   printk (" << %s (0x%08x)\n", func_name, func_addr);
    86 }
    87 static inline void rtld_pg_printk_ret(const char* ret_type,
    88                                       int         ret_size,
    89                                       void*       ret)
    90 {
    91   const unsigned char* p = ret;
    92   int   i;
    93   printk (" rt] %s(%d) = ", ret_type, ret_size);
    94   for (i = 0; i < ret_size; ++i, ++p) printk ("%02x", (unsigned int) *p);
    95   printk ("\n");
    96 }
    97 CODE
    98 
    99 [printk-generator-headers]
    100 header = "#include <stdio.h>"
     13[includes]
     14include = rtld-print.ini
Note: See TracChangeset for help on using the changeset viewer.