Changeset 8565a42 in mainline for kernel/generic/src/debug/symtab.c


Ignore:
Timestamp:
2018-03-02T20:34:50Z (7 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a1a81f69, d5e5fd1
Parents:
3061bc1 (diff), 34e1206 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:34:50)
git-committer:
GitHub <noreply@…> (2018-03-02 20:34:50)
Message:

Remove all trailing whitespace, everywhere.

See individual commit messages for details.

File:
1 edited

Legend:

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

    r3061bc1 r8565a42  
    5858#ifdef CONFIG_SYMTAB
    5959        size_t i;
    60        
     60
    6161        for (i = 1; symbol_table[i].address_le; i++) {
    6262                if (addr < uint64_t_le2host(symbol_table[i].address_le))
    6363                        break;
    6464        }
    65        
     65
    6666        if (addr >= uint64_t_le2host(symbol_table[i - 1].address_le)) {
    6767                *name = symbol_table[i - 1].symbol_name;
     
    7171                return EOK;
    7272        }
    73        
     73
    7474        *name = NULL;
    7575        return ENOENT;
    76        
     76
    7777#else
    7878        *name = NULL;
     
    9797        const char *name;
    9898        errno_t rc = symtab_name_lookup(addr, &name, NULL);
    99        
     99
    100100        switch (rc) {
    101101        case EOK:
     
    121121{
    122122        size_t namelen = str_length(name);
    123        
     123
    124124        size_t pos;
    125125        for (pos = *startpos; symbol_table[pos].address_le; pos++) {
    126126                const char *curname = symbol_table[pos].symbol_name;
    127                
     127
    128128                /* Find a ':' in curname */
    129129                const char *colon = str_chr(curname, ':');
    130130                if (colon == NULL)
    131131                        continue;
    132                
     132
    133133                if (str_length(curname) < namelen)
    134134                        continue;
    135                
     135
    136136                if (str_lcmp(name, curname, namelen) == 0) {
    137137                        *startpos = pos;
     
    139139                }
    140140        }
    141        
     141
    142142        return NULL;
    143143}
     
    162162        size_t pos = 0;
    163163        const char *hint;
    164        
     164
    165165        while ((hint = symtab_search_one(name, &pos))) {
    166166                if (str_length(hint) == 0) {
     
    170170                pos++;
    171171        }
    172        
     172
    173173        if (found > 1)
    174174                return EOVERFLOW;
    175        
     175
    176176        if (found < 1)
    177177                return ENOENT;
    178        
     178
    179179        return EOK;
    180        
     180
    181181#else
    182182        return ENOTSUP;
     
    195195                pos++;
    196196        }
    197        
     197
    198198#else
    199199        printf("No symbol information available.\n");
     
    208208        size_t len = str_length(input);
    209209        struct symtab_entry **entry = (struct symtab_entry**)ctx;
    210        
     210
    211211        if (*entry == NULL)
    212212                *entry = symbol_table;
    213        
     213
    214214        for (; (*entry)->address_le; (*entry)++) {
    215215                const char *curname = (*entry)->symbol_name;
    216                
     216
    217217                /* Find a ':' in curname */
    218218                const char *colon = str_chr(curname, ':');
    219219                if (colon == NULL)
    220220                        continue;
    221                
     221
    222222                if (str_length(curname) < len)
    223223                        continue;
    224                
     224
    225225                if (str_lcmp(input, curname, len) == 0) {
    226226                        (*entry)++;
     
    230230                }
    231231        }
    232        
     232
    233233        return NULL;
    234        
     234
    235235#else
    236236        return NULL;
Note: See TracChangeset for help on using the changeset viewer.