/* replace it */
gdb_stepped_opcode = *(short*)addr;
gdb_step_pc = addr;
- *(short*)addr = STEP_OPCODE;
+ *(short*)addr = STEP_OPCODE; /* FIXME: Use HW break if PC is in flash */
/* we're all done now */
gdb_return_from_exception();
or when other exception occurs in stepi
so remember address of replaced instruction separately
*/
-void gdb_undo_step ( void )
+void gdb_undo_step ( void ) /* FIXME: If using HW steps, undo hw steps. */
{
/* quite bad idea to use 0 here, 0 is NOP */
/* STEP_OPCODE should be ok */
} else { /* insert HW breakpoint */
#if USE_HW_BREAKPOINTS
/* find free channel */
- if(pbc_use[0]<0) i=0;
+ if(pbc_use[0]<0) i=0; /* FIXME: Add support for HW stepping. */
else if(pbc_use[1]<0) i=1;
else {
/* no channel free */
excptvec_set(sci_vect,gdb_scirxerr_isr); /* ERIx */
excptvec_set(sci_vect+1,gdb_scirx_isr); /* RXIx */
- excptvec_set(sci_vect,gdb_unhandled_isr); /* TXIx */
- excptvec_set(sci_vect,gdb_unhandled_isr); /* TEIx */
+ excptvec_set(sci_vect+2,gdb_unhandled_isr); /* TXIx */
+ excptvec_set(sci_vect+3,gdb_unhandled_isr); /* TEIx */
excptvec_set(EXCPTVEC_NMI,gdb_nmi_isr); /* NMI */
excptvec_set(EXCPTVEC_TRAP2,gdb_trapa2_isr); /* TRAPA2 */