Changeset 7f1c620 in mainline for generic/src/debug/symtab.c


Ignore:
Timestamp:
2006-07-04T17:17:56Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0ffa3ef5
Parents:
991779c5
Message:

Replace old u?? types with respective C99 variants (e.g. uint32_t, int64_t, uintptr_t etc.).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/debug/symtab.c

    r991779c5 r7f1c620  
    5151 * @return Pointer to respective symbol string on success, NULL otherwise.
    5252 */
    53 char * get_symtab_entry(__native addr)
     53char * get_symtab_entry(unative_t addr)
    5454{
    5555        count_t i;
    5656
    5757        for (i=1;symbol_table[i].address_le;++i) {
    58                 if (addr < __u64_le2host(symbol_table[i].address_le))
     58                if (addr < uint64_t_le2host(symbol_table[i].address_le))
    5959                        break;
    6060        }
    61         if (addr >= __u64_le2host(symbol_table[i-1].address_le))
     61        if (addr >= uint64_t_le2host(symbol_table[i-1].address_le))
    6262                return symbol_table[i-1].symbol_name;
    6363        return NULL;
     
    109109 * @return 0 - Not found, -1 - Duplicate symbol, other - address of symbol
    110110 */
    111 __address get_symbol_addr(const char *name)
     111uintptr_t get_symbol_addr(const char *name)
    112112{
    113113        count_t found = 0;
    114         __address addr = NULL;
     114        uintptr_t addr = NULL;
    115115        char *hint;
    116116        int i;
     
    119119        while ((hint=symtab_search_one(name, &i))) {
    120120                if (!strlen(hint)) {
    121                         addr =  __u64_le2host(symbol_table[i].address_le);
     121                        addr =  uint64_t_le2host(symbol_table[i].address_le);
    122122                        found++;
    123123                }
     
    125125        }
    126126        if (found > 1)
    127                 return ((__address) -1);
     127                return ((uintptr_t) -1);
    128128        return addr;
    129129}
     
    133133{
    134134        int i;
    135         __address addr;
     135        uintptr_t addr;
    136136        char *realname;
    137137
     
    139139        i = 0;
    140140        while (symtab_search_one(name, &i)) {
    141                 addr =  __u64_le2host(symbol_table[i].address_le);
     141                addr =  uint64_t_le2host(symbol_table[i].address_le);
    142142                realname = symbol_table[i].symbol_name;
    143                 printf("%.*p: %s\n", sizeof(__address) * 2, addr, realname);
     143                printf("%.*p: %s\n", sizeof(uintptr_t) * 2, addr, realname);
    144144                i++;
    145145        }
Note: See TracChangeset for help on using the changeset viewer.