Mercurial > ecos
comparison packages/hal/arm/arch/current/src/arm_stub.c @ 136:a9ac27ec7abc ecos-sw-2000-11-17
Merge from eCos master repository on 2000-11-17-18:24:25-GMT
| author | jlarmour |
|---|---|
| date | Fri, 17 Nov 2000 23:16:43 +0000 |
| parents | 0ae0bc38e387 |
| children | 25e238959bae |
comparison
equal
deleted
inserted
replaced
| 135:3bc2abeae9ff | 136:a9ac27ec7abc |
|---|---|
| 44 | 44 |
| 45 #include <stddef.h> | 45 #include <stddef.h> |
| 46 | 46 |
| 47 #include <pkgconf/hal.h> | 47 #include <pkgconf/hal.h> |
| 48 | 48 |
| 49 #ifdef CYGPKG_REDBOOT | |
| 50 #include <pkgconf/redboot.h> | |
| 51 #endif | |
| 52 | |
| 49 #ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS | 53 #ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS |
| 50 | 54 |
| 51 #ifdef CYGPKG_HAL_ARM_SIM | 55 #ifdef CYGPKG_HAL_ARM_SIM |
| 52 #error "GDB Stub support not implemented for ARM SIM" | 56 #error "GDB Stub support not implemented for ARM SIM" |
| 53 #endif | 57 #endif |
| 77 | 81 |
| 78 int __computeSignal (unsigned int trap_number) | 82 int __computeSignal (unsigned int trap_number) |
| 79 { | 83 { |
| 80 // Check to see if we stopped because of a hw watchpoint/breakpoint. | 84 // Check to see if we stopped because of a hw watchpoint/breakpoint. |
| 81 #ifdef HAL_STUB_IS_STOPPED_BY_HARDWARE | 85 #ifdef HAL_STUB_IS_STOPPED_BY_HARDWARE |
| 82 if (HAL_STUB_IS_STOPPED_BY_HARDWARE(trap_number)) | 86 { |
| 83 return SIGTRAP; | 87 void *daddr; |
| 88 if (HAL_STUB_IS_STOPPED_BY_HARDWARE(daddr)) | |
| 89 return SIGTRAP; | |
| 90 } | |
| 84 #endif | 91 #endif |
| 85 // should also catch CYGNUM_HAL_VECTOR_UNDEF_INSTRUCTION here but we | 92 // should also catch CYGNUM_HAL_VECTOR_UNDEF_INSTRUCTION here but we |
| 86 // can't tell the different between a real one and a breakpoint :-( | 93 // can't tell the different between a real one and a breakpoint :-( |
| 87 switch (trap_number) { | 94 switch (trap_number) { |
| 88 case CYGNUM_HAL_VECTOR_ABORT_PREFETCH: // Fall through | 95 case CYGNUM_HAL_VECTOR_ABORT_PREFETCH: // Fall through |
| 103 { | 110 { |
| 104 // The vector is not not part of the GDB register set so get it | 111 // The vector is not not part of the GDB register set so get it |
| 105 // directly from the save context. | 112 // directly from the save context. |
| 106 return _hal_registers->vector; | 113 return _hal_registers->vector; |
| 107 } | 114 } |
| 115 | |
| 116 | |
| 117 #if defined(CYGSEM_REDBOOT_BSP_SYSCALLS) | |
| 118 int __is_bsp_syscall(void) | |
| 119 { | |
| 120 return _hal_registers->vector == CYGNUM_HAL_EXCEPTION_INTERRUPT; | |
| 121 } | |
| 122 #endif | |
| 108 | 123 |
| 109 /* Set the currently-saved pc register value to PC. */ | 124 /* Set the currently-saved pc register value to PC. */ |
| 110 | 125 |
| 111 void set_pc (target_register_t pc) | 126 void set_pc (target_register_t pc) |
| 112 { | 127 { |
