Changeset 0dee005 in mainline
- Timestamp:
- 2010-01-08T20:03:32Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f1a2c6e
- Parents:
- b83ba81
- Location:
- kernel/generic
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/symtab.h
rb83ba81 r0dee005 45 45 }; 46 46 47 extern int symtab_name_lookup(u native_t addr, char **name);48 extern char *symtab_fmt_name_lookup(u native_t addr);49 extern int symtab_addr_lookup(const char * name, uintptr_t *addr);50 extern void symtab_print_search(const char * name);51 extern int symtab_compl(char * input, size_t size);47 extern int symtab_name_lookup(uintptr_t, char **, uintptr_t *); 48 extern char *symtab_fmt_name_lookup(uintptr_t); 49 extern int symtab_addr_lookup(const char *, uintptr_t *); 50 extern void symtab_print_search(const char *); 51 extern int symtab_compl(char *, size_t); 52 52 53 53 #ifdef CONFIG_SYMTAB -
kernel/generic/src/debug/symtab.c
rb83ba81 r0dee005 46 46 /** Get name of a symbol that seems most likely to correspond to address. 47 47 * 48 * @param addr Address. 49 * @param name Place to store pointer to the symbol name. 48 * @param addr Address. 49 * @param name Place to store pointer to the symbol name. 50 * @param offset Place to store offset from the symbol address. 50 51 * 51 52 * @return Zero on success or negative error code, ENOENT if not found, … … 53 54 * 54 55 */ 55 int symtab_name_lookup(u native_t addr, char **name)56 int symtab_name_lookup(uintptr_t addr, char **name, uintptr_t *offset) 56 57 { 57 58 #ifdef CONFIG_SYMTAB … … 65 66 if (addr >= uint64_t_le2host(symbol_table[i - 1].address_le)) { 66 67 *name = symbol_table[i - 1].symbol_name; 68 if (offset) 69 *offset = addr - 70 uint64_t_le2host(symbol_table[i - 1].address_le); 67 71 return EOK; 68 72 } … … 88 92 * 89 93 */ 90 char *symtab_fmt_name_lookup(u native_t addr)94 char *symtab_fmt_name_lookup(uintptr_t addr) 91 95 { 92 96 char *name; 93 int rc = symtab_name_lookup(addr, &name );97 int rc = symtab_name_lookup(addr, &name, NULL); 94 98 95 99 switch (rc) {
Note:
See TracChangeset
for help on using the changeset viewer.