Changeset 371bd7d in mainline for kernel/generic/src/debug
- Timestamp:
- 2010-03-27T09:22:17Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 36a75a2
- Parents:
- cd82bb1 (diff), eaf22d4 (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. - Location:
- kernel/generic/src/debug
- Files:
-
- 1 added
- 1 edited
-
stacktrace.c (added)
-
symtab.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/debug/symtab.c
rcd82bb1 r371bd7d 38 38 #include <symtab.h> 39 39 #include <byteorder.h> 40 #include <str ing.h>40 #include <str.h> 41 41 #include <print.h> 42 #include < arch/types.h>42 #include <typedefs.h> 43 43 #include <typedefs.h> 44 44 #include <errno.h> … … 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, const 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 c har *symtab_fmt_name_lookup(unative_t addr)91 { 92 c har *name;93 int rc = symtab_name_lookup(addr, &name );94 const char *symtab_fmt_name_lookup(uintptr_t addr) 95 { 96 const char *name; 97 int rc = symtab_name_lookup(addr, &name, NULL); 94 98 95 99 switch (rc) { … … 235 239 printf("\n"); 236 240 pos = 0; 237 while ( (hint = symtab_search_one(name, &pos))) {241 while (symtab_search_one(name, &pos)) { 238 242 printf("%s\n", symbol_table[pos].symbol_name); 239 243 pos++;
Note:
See TracChangeset
for help on using the changeset viewer.
