Mercurial > flash_v2
comparison packages/hal/common/current/src/hal_stub.c @ 50:a0774359f013 ecos-sw-1999-11-02
Merge from eCos master repository on 1999-11-02-17:02:15-GMT
| author | jlarmour |
|---|---|
| date | Tue, 02 Nov 1999 20:57:07 +0000 |
| parents | 1370c5e55234 |
| children | c38311975d4f |
comparison
equal
deleted
inserted
replaced
| 49:698ff3191b93 | 50:a0774359f013 |
|---|---|
| 41 //####DESCRIPTIONEND#### | 41 //####DESCRIPTIONEND#### |
| 42 // | 42 // |
| 43 //============================================================================= | 43 //============================================================================= |
| 44 | 44 |
| 45 #include <pkgconf/hal.h> | 45 #include <pkgconf/hal.h> |
| 46 #ifdef CYGPKG_CYGMON | |
| 47 #include <pkgconf/cygmon.h> | |
| 48 #endif | |
| 46 | 49 |
| 47 #ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS | 50 #ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS |
| 48 | 51 |
| 49 #include <cyg/hal/hal_stub.h> // Our header | 52 #include <cyg/hal/hal_stub.h> // Our header |
| 50 | 53 |
| 137 static instrBuffer break_buffer; | 140 static instrBuffer break_buffer; |
| 138 | 141 |
| 139 volatile int cyg_hal_gdb_running_step = 0; | 142 volatile int cyg_hal_gdb_running_step = 0; |
| 140 | 143 |
| 141 void | 144 void |
| 145 cyg_hal_gdb_place_break (target_register_t pc) | |
| 146 { | |
| 147 cyg_hal_gdb_interrupt( pc ); // Let's hope this becomes a drop-through: | |
| 148 } | |
| 149 | |
| 150 void | |
| 142 cyg_hal_gdb_interrupt (target_register_t pc) | 151 cyg_hal_gdb_interrupt (target_register_t pc) |
| 143 { | 152 { |
| 144 // Clear this regardless | 153 // Clear flag that we Continued instead of Stepping |
| 145 cyg_hal_gdb_running_step = 0; | 154 cyg_hal_gdb_running_step = 0; |
| 146 // so that a call to set a BP because of a ^C will take effect | 155 // and override existing break? So that a ^C takes effect... |
| 156 if (NULL != break_buffer.targetAddr) | |
| 157 cyg_hal_gdb_remove_break( (target_register_t)break_buffer.targetAddr ); | |
| 158 | |
| 147 if (NULL == break_buffer.targetAddr) { | 159 if (NULL == break_buffer.targetAddr) { |
| 148 break_buffer.targetAddr = (t_inst*) pc; | 160 break_buffer.targetAddr = (t_inst*) pc; |
| 149 break_buffer.savedInstr = *(t_inst*)pc; | 161 break_buffer.savedInstr = *(t_inst*)pc; |
| 150 *(t_inst*)pc = (t_inst)HAL_BREAKINST; | 162 *(t_inst*)pc = (t_inst)HAL_BREAKINST; |
| 151 | 163 |
