Mercurial > flash_v2
comparison packages/hal/common/current/include/generic-stub.h @ 112:02ea4320376c ecos-sw-2000-07-21
Merge from eCos master repository on 2000-07-21-21:01:39-BST
| author | jlarmour |
|---|---|
| date | Fri, 21 Jul 2000 21:34:11 +0000 |
| parents | 435cced73e2f |
| children | 6ed91473a1cd |
comparison
equal
deleted
inserted
replaced
| 111:211b8a635ce9 | 112:02ea4320376c |
|---|---|
| 92 /* Store VALUE in the register corresponding to WHICH. */ | 92 /* Store VALUE in the register corresponding to WHICH. */ |
| 93 extern void put_register (regnames_t which, target_register_t value); | 93 extern void put_register (regnames_t which, target_register_t value); |
| 94 | 94 |
| 95 /* Set the next instruction to be executed when the user program resumes | 95 /* Set the next instruction to be executed when the user program resumes |
| 96 execution to PC. */ | 96 execution to PC. */ |
| 97 #if !defined(SET_PC_PROTOTYPE_EXISTS) && !defined(set_pc) | |
| 98 #define SET_PC_PROTOTYPE_EXISTS | |
| 97 extern void set_pc (target_register_t pc); | 99 extern void set_pc (target_register_t pc); |
| 100 #endif | |
| 98 | 101 |
| 99 /* Set the return value of the currently-pending syscall to VALUE. */ | 102 /* Set the return value of the currently-pending syscall to VALUE. */ |
| 100 extern void set_syscall_value (target_register_t value); | 103 extern void set_syscall_value (target_register_t value); |
| 101 | 104 |
| 102 /* Return the Nth argument to the currently-pending syscall (starting from | 105 /* Return the Nth argument to the currently-pending syscall (starting from |
| 113 /* Skip the current instruction. */ | 116 /* Skip the current instruction. */ |
| 114 extern void __skipinst (void); | 117 extern void __skipinst (void); |
| 115 | 118 |
| 116 /* If the address in the PC register corresponds to the breakpoint() | 119 /* If the address in the PC register corresponds to the breakpoint() |
| 117 instruction, return a non-zero value. */ | 120 instruction, return a non-zero value. */ |
| 121 #ifndef __is_breakpoint_function | |
| 118 extern int __is_breakpoint_function (void); | 122 extern int __is_breakpoint_function (void); |
| 123 #endif | |
| 119 | 124 |
| 120 /* Execute a breakpoint instruction. Restarting will cause the instruction | 125 /* Execute a breakpoint instruction. Restarting will cause the instruction |
| 121 to be skipped. */ | 126 to be skipped. */ |
| 127 #ifndef breakpoint | |
| 122 extern void breakpoint (void); | 128 extern void breakpoint (void); |
| 129 #endif | |
| 123 | 130 |
| 124 /* Return the syscall # corresponding to this system call. */ | 131 /* Return the syscall # corresponding to this system call. */ |
| 125 extern int __get_syscall_num (void); | 132 extern int __get_syscall_num (void); |
| 126 | 133 |
| 127 /* Transfer exception event processing to the stub. */ | 134 /* Transfer exception event processing to the stub. */ |
| 140 | 147 |
| 141 /* Copy COUNT bytes of memory from BUF to ADDR. | 148 /* Copy COUNT bytes of memory from BUF to ADDR. |
| 142 ADDR is assumed to live in the user program's space. | 149 ADDR is assumed to live in the user program's space. |
| 143 Returns number of bytes successfully read | 150 Returns number of bytes successfully read |
| 144 (caller must check to see if less than requested). */ | 151 (caller must check to see if less than requested). */ |
| 152 #ifndef __write_mem_safe | |
| 145 extern int __write_mem_safe (void *buf, | 153 extern int __write_mem_safe (void *buf, |
| 146 void *addr, | 154 void *addr, |
| 147 int count); | 155 int count); |
| 156 #endif | |
| 148 | 157 |
| 149 /* Set to a non-zero value if a memory fault occurs while | 158 /* Set to a non-zero value if a memory fault occurs while |
| 150 __set_mem_fault_trap () is running. */ | 159 __set_mem_fault_trap () is running. */ |
| 151 extern volatile int __mem_fault; | 160 extern volatile int __mem_fault; |
| 152 | 161 |
| 187 /* When an exception occurs, __process_exception_vec will be invoked with | 196 /* When an exception occurs, __process_exception_vec will be invoked with |
| 188 the signal number corresponding to the trap/exception. The function | 197 the signal number corresponding to the trap/exception. The function |
| 189 should return zero if it wishes execution to resume from the saved | 198 should return zero if it wishes execution to resume from the saved |
| 190 register values; a non-zero value indicates that the exception handler | 199 register values; a non-zero value indicates that the exception handler |
| 191 should be reinvoked. */ | 200 should be reinvoked. */ |
| 201 #if !defined(PROCESS_EXCEPTION_VEC_PROTOTYPE_EXISTS) | |
| 202 #define PROCESS_EXCEPTION_VEC_PROTOTYPE_EXISTS | |
| 192 extern volatile __PFI __process_exception_vec; | 203 extern volatile __PFI __process_exception_vec; |
| 204 #endif | |
| 193 | 205 |
| 194 /* __process_exit_vec is invoked when a 'k' kill packet is received | 206 /* __process_exit_vec is invoked when a 'k' kill packet is received |
| 195 from GDB. */ | 207 from GDB. */ |
| 196 extern volatile __PFV __process_exit_vec; | 208 extern volatile __PFV __process_exit_vec; |
| 197 | 209 |
| 290 | 302 |
| 291 /* Write the C-style string pointed to by STR to the GDB comm port. | 303 /* Write the C-style string pointed to by STR to the GDB comm port. |
| 292 Used for printing debug messages. */ | 304 Used for printing debug messages. */ |
| 293 extern void __putDebugStr (char *str); | 305 extern void __putDebugStr (char *str); |
| 294 | 306 |
| 295 #ifdef NO_MALLOC | 307 #if defined(NO_MALLOC) && !defined(MAX_BP_NUM) |
| 296 #define MAX_BP_NUM 64 /* Maximum allowed # of breakpoints */ | 308 #define MAX_BP_NUM 64 /* Maximum allowed # of breakpoints */ |
| 297 #endif | 309 #endif |
| 298 | 310 |
| 299 #endif /* ASM */ | 311 #endif /* ASM */ |
| 300 | 312 |
