Changeset e2b762ec in mainline for kernel/arch/mips32/src/debugger.c


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/arch/mips32/src/debugger.c

    rd9167a1c re2b762ec  
    3838#include <console/kconsole.h>
    3939#include <console/cmd.h>
    40 #include <symtab.h>
    4140#include <print.h>
    4241#include <panic.h>
     
    4443#include <arch/cp0.h>
    4544#include <func.h>
     45
     46#ifdef CONFIG_SYMTAB
     47#include <symtab.h>
     48#endif
    4649
    4750bpinfo_t breakpoints[BKPOINTS_MAX];
     
    260263        for (i = 0; i < BKPOINTS_MAX; i++)
    261264                if (breakpoints[i].address) {
     265#ifdef CONFIG_SYMTAB
    262266                        symbol = get_symtab_entry(breakpoints[i].address);
     267#else
     268                        symbol = "n/a";
     269#endif
    263270                       
    264271                        printf("%-2u %-5d %#10zx %-6s %-7s %-8s %s\n", i,
     
    349356                        printf("Warning: breakpoint recursion\n");
    350357               
    351                 if (!(cur->flags & BKPOINT_FUNCCALL))
     358                if (!(cur->flags & BKPOINT_FUNCCALL)) {
     359#ifdef CONFIG_SYMTAB
    352360                        printf("***Breakpoint %d: %p in %s.\n", i, fireaddr,
    353361                            get_symtab_entry(istate->epc));
     362#else
     363                        printf("***Breakpoint %d: %p.\n", i, fireaddr);
     364#endif
     365                }
    354366
    355367                /* Return first instruction back */
     
    364376                cur->flags |= BKPOINT_INPROG;
    365377        } else {
    366                 printf("***Breakpoint %p in %s.\n", fireaddr,
     378#ifdef CONFIG_SYMTAB
     379                printf("***Breakpoint %p in %s.\n", fireaddr,
    367380                       get_symtab_entry(fireaddr));
     381#else
     382                printf("***Breakpoint %p.\n", fireaddr);       
     383#endif
    368384                /* Move on to next instruction */
    369385                istate->epc += 4;
Note: See TracChangeset for help on using the changeset viewer.