diff 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
line wrap: on
line diff
--- a/packages/hal/arm/arch/current/src/arm_stub.c
+++ b/packages/hal/arm/arch/current/src/arm_stub.c
@@ -46,6 +46,10 @@
 
 #include <pkgconf/hal.h>
 
+#ifdef CYGPKG_REDBOOT
+#include <pkgconf/redboot.h>
+#endif
+
 #ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
 
 #ifdef CYGPKG_HAL_ARM_SIM
@@ -79,8 +83,11 @@ int __computeSignal (unsigned int trap_n
 {
     // Check to see if we stopped because of a hw watchpoint/breakpoint.
 #ifdef HAL_STUB_IS_STOPPED_BY_HARDWARE
-    if (HAL_STUB_IS_STOPPED_BY_HARDWARE(trap_number))
-	return SIGTRAP;
+    {
+	void *daddr;
+	if (HAL_STUB_IS_STOPPED_BY_HARDWARE(daddr))
+	    return SIGTRAP;
+    }
 #endif
     // should also catch CYGNUM_HAL_VECTOR_UNDEF_INSTRUCTION here but we
     // can't tell the different between a real one and a breakpoint :-(
@@ -106,6 +113,14 @@ int __get_trap_number (void)
     return _hal_registers->vector;
 }
 
+
+#if defined(CYGSEM_REDBOOT_BSP_SYSCALLS)
+int __is_bsp_syscall(void) 
+{
+    return _hal_registers->vector == CYGNUM_HAL_EXCEPTION_INTERRUPT;
+}
+#endif
+
 /* Set the currently-saved pc register value to PC. */
 
 void set_pc (target_register_t pc)