comparison packages/kernel/current/src/debug/dbg-thread-demux.c @ 6:d376b777e2ce ecos-sw-1999-05-14

Merge from eCos master repository on 1999-05-14-19:27:43-BST
author jlarmour
date Fri, 14 May 1999 12:20:00 +0000
parents 443894e2e912
children c38311975d4f
comparison
equal deleted inserted replaced
5:4e8259f41183 6:d376b777e2ce
71 #include <pkgconf/kernel.h> 71 #include <pkgconf/kernel.h>
72 72
73 #include <cyg/infra/cyg_type.h> 73 #include <cyg/infra/cyg_type.h>
74 74
75 #include "cyg/hal/dbg-threads-api.h" 75 #include "cyg/hal/dbg-threads-api.h"
76 #include "dbg-thread-syscall.h" 76 #include "cyg/hal/dbg-thread-syscall.h"
77 77
78 // ------------------------------------------------------------------------- 78 // -------------------------------------------------------------------------
79 79
80 static int dbg_thread_syscall_rmt( 80 static int dbg_thread_syscall_rmt(
81 enum dbg_syscall_ids id, 81 enum dbg_syscall_ids id,
123 return 0 ; /* failure tue to non-implementation */ 123 return 0 ; /* failure tue to non-implementation */
124 } 124 }
125 } 125 }
126 126
127 // ------------------------------------------------------------------------- 127 // -------------------------------------------------------------------------
128 // When Cygmon calls us on the TX39 It has its own value in GP. We need to 128 // When Cygmon calls us on the MIPS It has its own value in GP. We need to
129 // save that and set our own before proceeding. 129 // save that and set our own before proceeding.
130 130
131 #ifdef CYG_HAL_TX39 131 #ifdef CYGPKG_HAL_MIPS
132 static int dbg_thread_syscall_rmt_1( 132 static int dbg_thread_syscall_rmt_1(
133 enum dbg_syscall_ids id, 133 enum dbg_syscall_ids id,
134 union dbg_thread_syscall_parms * p 134 union dbg_thread_syscall_parms * p
135 ) 135 )
136 { 136 {
137 137
138 register long gp_save; 138 register long gp_save;
139 int r; 139 int r;
140 asm ( "move %0,$28;" 140 asm volatile ( "move %0,$28;"
141 ".extern _gp;" 141 ".extern _gp;"
142 "la $gp,_gp;" 142 "la $gp,_gp;"
143 : "=r"(gp_save) 143 : "=r"(gp_save)
144 ); 144 );
145 145
146 r = dbg_thread_syscall_rmt( id, p ); 146 r = dbg_thread_syscall_rmt( id, p );
147 147
148 asm ( "move $gp,%0;" :: "r"(gp_save) ); 148 asm volatile ( "move $gp,%0;" :: "r"(gp_save) );
149 149
150 return r; 150 return r;
151 151
152 } 152 }
153 #endif 153 #endif
175 dbg_syscall_func * f ; 175 dbg_syscall_func * f ;
176 f = vector ; 176 f = vector ;
177 177
178 #ifdef CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT 178 #ifdef CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT
179 179
180 #ifdef CYG_HAL_TX39 180 #ifdef CYGPKG_HAL_MIPS
181 f[DBG_SYSCALL_THREAD_VEC_NUM] = dbg_thread_syscall_rmt_1 ; 181 f[DBG_SYSCALL_THREAD_VEC_NUM] = dbg_thread_syscall_rmt_1 ;
182 #else 182 #else
183 f[DBG_SYSCALL_THREAD_VEC_NUM] = dbg_thread_syscall_rmt ; 183 f[DBG_SYSCALL_THREAD_VEC_NUM] = dbg_thread_syscall_rmt ;
184 #endif 184 #endif
185 185