Changeset 40d4c1d in mainline for kernel/generic/src/debug/symtab.c


Ignore:
Timestamp:
2010-01-08T22:13:34Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
234e39e
Parents:
eb0bc90 (diff), 6d7f9bfe (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.
Message:

Merge the stack tracing branch.

The merge includes generic and amd64 and ia32 support for kernel stack traces.
The kernel will now print a stack trace for each killed task and also for
each bad trap and panic. The rest of the architectures have dummy support,
i.e. they compile and run, but the kernel cannot print the stack trace.

File:
1 edited

Legend:

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

    reb0bc90 r40d4c1d  
    4646/** Get name of a symbol that seems most likely to correspond to address.
    4747 *
    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.
    5051 *
    5152 * @return Zero on success or negative error code, ENOENT if not found,
     
    5354 *
    5455 */
    55 int symtab_name_lookup(unative_t addr, char **name)
     56int symtab_name_lookup(uintptr_t addr, char **name, uintptr_t *offset)
    5657{
    5758#ifdef CONFIG_SYMTAB
     
    6566        if (addr >= uint64_t_le2host(symbol_table[i - 1].address_le)) {
    6667                *name = symbol_table[i - 1].symbol_name;
     68                if (offset)
     69                        *offset = addr -
     70                            uint64_t_le2host(symbol_table[i - 1].address_le);
    6771                return EOK;
    6872        }
     
    8892 *
    8993 */
    90 char *symtab_fmt_name_lookup(unative_t addr)
     94char *symtab_fmt_name_lookup(uintptr_t addr)
    9195{
    9296        char *name;
    93         int rc = symtab_name_lookup(addr, &name);
     97        int rc = symtab_name_lookup(addr, &name, NULL);
    9498       
    9599        switch (rc) {
Note: See TracChangeset for help on using the changeset viewer.