• Stafford Horne's avatar
    openrisc: fix trap for debugger breakpoint signalling · 28b852b1
    Stafford Horne authored
    I have been working on getting native Linux GDB support working for the
    OpenRISC port.  The trap signal handler here was wrong in a few ways.
    During trap handling address (from the EEAR register) is not set by the
    CPU, so it is not correct to use here.  We want to use trap as a
    break-point so use TRAP_BRKPT.  Adding 4 to the pc was incorrect and
    causing GDB to think the breakpoint was not hit.
    
    Fixing these allows GDB to work now.
    Signed-off-by: default avatarStafford Horne <shorne@gmail.com>
    28b852b1
traps.c 11.4 KB