Changeset 5bb8e45 in mainline


Ignore:
Timestamp:
2005-12-13T01:38:50Z (19 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.

Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • arch/mips32/Makefile.inc

    rc52ed6b r5bb8e45  
    101101        arch/$(ARCH)/src/interrupt.c \
    102102        arch/$(ARCH)/src/cache.c \
     103        arch/$(ARCH)/src/debugger.c \
    103104        arch/$(ARCH)/src/cpu/cpu.c \
    104105        arch/$(ARCH)/src/mm/asid.c \
  • 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
  • arch/mips32/src/mips32.c

    rc52ed6b r5bb8e45  
    4343#include <arch/drivers/arc.h>
    4444#include <console/chardev.h>
     45#include <arch/debugger.h>
    4546
    4647#include <arch/asm/regname.h>
     
    9293
    9394        console_init();
     95        debugger_init();
    9496        arc_print_memory_map();
    9597        arc_print_devices();
  • generic/src/console/kconsole.c

    rc52ed6b r5bb8e45  
    431431       
    432432        /* If we get a name, try to find it in symbol table */
    433         if (text[0] < '0' | text[0] > '9') {
     433        if (text[0] < '0' || text[0] > '9') {
    434434                if (text[0] == '&') {
    435435                        isaddr = true;
Note: See TracChangeset for help on using the changeset viewer.