Ignore:
Timestamp:
2009-03-16T21:58:05Z (15 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f36c061
Parents:
d9167a1c
Message:

Make kernel symbol information optional.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/console/kconsole.c

    rd9167a1c re2b762ec  
    5151#include <func.h>
    5252#include <string.h>
    53 #include <symtab.h>
    5453#include <macros.h>
    5554#include <sysinfo/sysinfo.h>
    5655#include <ddi/device.h>
     56
     57#ifdef CONFIG_SYMTAB
     58#include <symtab.h>
     59#endif
    5760
    5861/** Simple kernel console.
     
    259262static int cmdtab_compl(char *name)
    260263{
    261         static char output[MAX_SYMBOL_NAME + 1];
     264        static char output[/*MAX_SYMBOL_NAME*/128 + 1];
    262265        link_t *startpos = NULL;
    263266        const char *foundtxt;
     
    291294                }
    292295        }
    293         strncpy(name, output, MAX_SYMBOL_NAME);
     296        strncpy(name, output, 128/*MAX_SYMBOL_NAME*/);
    294297        return found;
    295        
    296298}
    297299
     
    348350                                found = cmdtab_compl(tmp);
    349351                        } else { /* Symtab completion */
     352#ifdef CONFIG_SYMTAB
    350353                                found = symtab_compl(tmp);
     354#else
     355                                found = 0;
     356#endif
    351357                        }
    352358
     
    516522static int parse_int_arg(char *text, size_t len, unative_t *result)
    517523{
    518         static char symname[MAX_SYMBOL_NAME];
    519524        uintptr_t symaddr;
    520525        bool isaddr = false;
    521526        bool isptr = false;
     527
     528#ifdef CONFIG_SYMTAB
     529        static char symname[MAX_SYMBOL_NAME];
     530#endif
    522531       
    523532        /* If we get a name, try to find it in symbol table */
     
    532541        }
    533542        if (text[0] < '0' || text[0] > '9') {
     543#ifdef CONFIG_SYMTAB
    534544                strncpy(symname, text, min(len + 1, MAX_SYMBOL_NAME));
    535545                symaddr = get_symbol_addr(symname);
     
    543553                        return -1;
    544554                }
     555#else
     556                symaddr = 0;
     557#endif
    545558                if (isaddr)
    546559                        *result = (unative_t)symaddr;
Note: See TracChangeset for help on using the changeset viewer.