Changeset 5bb8e45 in mainline for arch/mips32/src/exception.c


Ignore:
Timestamp:
2005-12-13T01:38:50Z (20 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5a95b25
Parents:
c52ed6b
Message:

Added support for mips breakpoints.
We have a kind of kernel debugger :-)
Breakpoints on JMP/Branch instructions are not supported and
they are reported after the breakpoint is fired and exited as
a BranchDelay exception. If we found a way, how to detect these
instructions, we would be able to support them as 'one-time' breakpoints.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/mips32/src/exception.c

    rc52ed6b r5bb8e45  
    4040#include <func.h>
    4141#include <console/kconsole.h>
     42#include <arch/debugger.h>
    4243
    4344static char * exctable[] = {
     
    8889{
    8990        struct exception_regdump *pstate = (struct exception_regdump *)data;
    90         char *symbol = get_symtab_entry(pstate->epc);
    9191
    92 #ifdef CONFIG_DEBUG     
    93         printf("***Breakpoint %p in %s.\n", pstate->epc, symbol);
    94         printf("***Type 'exit' to exit kconsole.\n");
    95         /* Umm..we should rather set some 'debugstate' here */
    96         haltstate = 1;
    97         kconsole("debug");
    98         haltstate = 0;
    99 #endif
    100 
     92#ifdef CONFIG_DEBUG
     93        debugger_bpoint(pstate);
     94#else
    10195        /* it is necessary to not re-execute BREAK instruction after
    10296           returning from Exception handler
    10397           (see page 138 in R4000 Manual for more information) */
    10498        pstate->epc += 4;
     99#endif
    105100}
    106101
Note: See TracChangeset for help on using the changeset viewer.