Changeset e16e0d59 in mainline for kernel/generic/src/console/kconsole.c
- Timestamp:
- 2009-03-17T20:33:18Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5eb90cb
- Parents:
- b1c8dc0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/console/kconsole.c
rb1c8dc0 re16e0d59 54 54 #include <sysinfo/sysinfo.h> 55 55 #include <ddi/device.h> 56 57 #ifdef CONFIG_SYMTAB58 56 #include <symtab.h> 59 # endif57 #include <errno.h> 60 58 61 59 /** Simple kernel console. … … 350 348 found = cmdtab_compl(tmp); 351 349 } else { /* Symtab completion */ 352 #ifdef CONFIG_SYMTAB353 350 found = symtab_compl(tmp); 354 #else355 found = 0;356 #endif357 351 } 358 352 … … 525 519 bool isaddr = false; 526 520 bool isptr = false; 527 528 #ifdef CONFIG_SYMTAB 521 int rc; 522 529 523 static char symname[MAX_SYMBOL_NAME]; 530 #endif531 524 532 525 /* If we get a name, try to find it in symbol table */ … … 541 534 } 542 535 if (text[0] < '0' || text[0] > '9') { 543 #ifdef CONFIG_SYMTAB544 536 strncpy(symname, text, min(len + 1, MAX_SYMBOL_NAME)); 545 symaddr = get_symbol_addr(symname); 546 if (!symaddr) { 537 rc = symtab_addr_lookup(symname, &symaddr); 538 switch (rc) { 539 case ENOENT: 547 540 printf("Symbol %s not found.\n", symname); 548 541 return -1; 549 } 550 if (symaddr == (uintptr_t) -1) { 542 case EOVERFLOW: 551 543 printf("Duplicate symbol %s.\n", symname); 552 544 symtab_print_search(symname); 553 545 return -1; 554 } 555 #else 556 symaddr = 0; 557 #endif 546 default: 547 printf("No symbol information available.\n"); 548 return -1; 549 } 550 558 551 if (isaddr) 559 552 *result = (unative_t)symaddr;
Note:
See TracChangeset
for help on using the changeset viewer.