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


Ignore:
Timestamp:
Sep 8, 2014, 10:20:41 PM (7 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, 5, master
Children:
b7ad4a2
Parents:
2126ea7
Message:

rtems-tld: Add entry and exit trace support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • linkers/rtld-base.ini

    r2126ea7 r6fb1409  
    1616[printf-generator]
    1717headers = printf-generator-headers
     18entry-trace = "rtld_pg_print_entry(@FUNC_NAME@, (void*) &@FUNC_LABEL@);"
    1819arg-trace = "rtld_pg_print_arg(@ARG_NUM@, @ARG_TYPE@, @ARG_SIZE@, (void*) &@ARG_LABEL@);"
     20exit-trace = "rtld_pg_print_exit(@FUNC_NAME@, (void*) &@FUNC_LABEL@);"
    1921ret-trace = "rtld_pg_print_ret(@RET_TYPE@, @RET_SIZE@, (void*) &@RET_LABEL@);"
    2022code = <<<CODE
     23static inline void rtld_pg_print_entry(const char* func_name,
     24                                       void*       func_addr)
     25{
     26  printf (" >> %s (0x%08x)\n", func_name, func_addr);
     27}
    2128static inline void rtld_pg_print_arg(int         arg_num,
    2229                                     const char* arg_type,
     
    2431                                     void*       arg)
    2532{
    26   const char* p = arg;
     33  const unsigned char* p = arg;
    2734  int   i;
    2835  printf (" %2d] %s(%d) = ", arg_num, arg_type, arg_size);
     
    3037  printf ("\n");
    3138}
     39static inline void rtld_pg_print_exit(const char* func_name,
     40                                      void*       func_addr)
     41{
     42  printf (" << %s (0x%08x)\n", func_name, func_addr);
     43}
    3244static inline void rtld_pg_print_ret(const char* ret_type,
    3345                                     int         ret_size,
    3446                                     void*       ret)
    3547{
    36   const char* p = ret;
     48  const unsigned char* p = ret;
    3749  int   i;
    3850  printf (" rt] %s(%d) = ", ret_type, ret_size);
Note: See TracChangeset for help on using the changeset viewer.