comparison packages/hal/common/current/include/dbg-threads-api.h @ 2:443894e2e912 ecos-v1_2_1-release

Block commit of eCos version 1.2.1
author jlarmour
date Tue, 11 May 1999 12:24:34 +0000
parents 3111d98ba7b3
children f10165814f1e
comparison
equal deleted inserted replaced
1:72f549f0d891 2:443894e2e912
4 used in supporting thread aware debugging. 4 used in supporting thread aware debugging.
5 The Operating Environment being debugged needs to supply these functions. 5 The Operating Environment being debugged needs to supply these functions.
6 */ 6 */
7 7
8 /* 8 /*
9 * Copyright (c) 1998 Cygnus Support 9 * Copyright (c) 1998,1999 Cygnus Solutions
10 * 10 *
11 * The authors hereby grant permission to use, copy, modify, distribute, 11 * The authors hereby grant permission to use, copy, modify, distribute,
12 * and license this software and its documentation for any purpose, provided 12 * and license this software and its documentation for any purpose, provided
13 * that existing copyright notices are retained in all copies and that this 13 * that existing copyright notices are retained in all copies and that this
14 * notice is included verbatim in any distributions. No written agreement, 14 * notice is included verbatim in any distributions. No written agreement,
16 * Modifications to this software may be copyrighted by their authors 16 * Modifications to this software may be copyrighted by their authors
17 * and need not follow the licensing terms described here, provided that 17 * and need not follow the licensing terms described here, provided that
18 * the new terms are clearly indicated on the first page of each file where 18 * the new terms are clearly indicated on the first page of each file where
19 * they apply. 19 * they apply.
20 */ 20 */
21
22 #include <cyg/infra/cyg_type.h> /* externC */
21 23
22 #define has_thread_void 0 24 #define has_thread_void 0
23 #define has_thread_current 1 25 #define has_thread_current 1
24 #define has_thread_registers 2 26 #define has_thread_registers 2
25 #define has_thread_reg_change 4 27 #define has_thread_reg_change 4
45 /* Return the unique ID number of the current thread. */ 47 /* Return the unique ID number of the current thread. */
46 extern int dbg_currthread_id(void); 48 extern int dbg_currthread_id(void);
47 49
48 /* get the first or next member of the list of known threads */ 50 /* get the first or next member of the list of known threads */
49 extern int dbg_threadlist(int startflag, 51 extern int dbg_threadlist(int startflag,
50 threadref * lastthreadid, 52 threadref * lastthreadid,
51 threadref * next_thread 53 threadref * next_thread
52 ) ; 54 ) ;
53 55
54 /* return 1 if next_threadid has been filled in with a value */ 56 /* return 1 if next_threadid has been filled in with a value */
55 /* return 0 if there are none or no more */ 57 /* return 0 if there are none or no more */
56 58
57 /* The O.S can fill in the following information about a thread when queried. 59 /* The O.S can fill in the following information about a thread when queried.
63 */ 65 */
64 struct cygmon_thread_debug_info 66 struct cygmon_thread_debug_info
65 { 67 {
66 threadref thread_id ; 68 threadref thread_id ;
67 int context_exists ; /* To the point where examining its state, 69 int context_exists ; /* To the point where examining its state,
68 registers and stack makes sense to GDB */ 70 registers and stack makes sense to GDB */
69 char * thread_display ; /* As shown in thread status window, name, state */ 71 char * thread_display ; /* As shown in thread status window, name, state */
70 char * unique_thread_name ; /* human readable identifier, window label */ 72 char * unique_thread_name ; /* human readable identifier, window label */
71 char * more_display ; /* more detailed info about thread. 73 char * more_display ; /* more detailed info about thread.
72 priority, queuedepth, state, stack usage, statistics */ 74 priority, queuedepth, state, stack usage, statistics */
73 } ; 75 } ;
74 76
75 77
76 78
77 79
78 extern int dbg_threadinfo( 80 extern int dbg_threadinfo(
79 threadref * threadid, 81 threadref * threadid,
80 struct cygmon_thread_debug_info * info) ; 82 struct cygmon_thread_debug_info * info) ;
81 83
82 /* Return 1 if threadid is defined and info copied, 0 otherwise */ 84 /* Return 1 if threadid is defined and info copied, 0 otherwise */
83 85
84 /* The O.S should fillin the array of registers using values from the 86 /* The O.S should fillin the array of registers using values from the
85 saves context. The array MUST be in GDB register save order even if 87 saves context. The array MUST be in GDB register save order even if
87 registers which are NOT in the O.S. thread context. Their default values 89 registers which are NOT in the O.S. thread context. Their default values
88 have already been assigned. 90 have already been assigned.
89 */ 91 */
90 92
91 extern int dbg_getthreadreg( 93 extern int dbg_getthreadreg(
92 threadref * osthreadid, 94 threadref * osthreadid,
93 int regcount, /* count of registers in the array */ 95 int regcount, /* count of registers in the array */
94 void * regval) ; /* fillin this array */ 96 void * regval) ; /* fillin this array */
95 97
96 98
97 /* The O.S. should scan through this list of registers which are in 99 /* The O.S. should scan through this list of registers which are in
98 GDB order and the O.S. should replace the values of all registers 100 GDB order and the O.S. should replace the values of all registers
99 which are defined in the saved context of thread or process identified 101 which are defined in the saved context of thread or process identified
100 by osthreadid. Return 0 if the threadis does not map to a known 102 by osthreadid. Return 0 if the threadis does not map to a known
101 process or other error. Return 1 if the setting is successful. */ 103 process or other error. Return 1 if the setting is successful. */
102 104
103 extern int dbg_setthreadreg( 105 extern int dbg_setthreadreg(
104 threadref * osthreadid, 106 threadref * osthreadid,
105 int regcount , /* number of registers */ 107 int regcount , /* number of registers */
106 void * regval) ; 108 void * regval) ;
109
110 /* Control over OS scheduler. With the scheduler locked it should not
111 perform any rescheduling in response to interrupts. */
112 externC int dbg_scheduler(
113 threadref * osthreadid,
114 int lock, /* 0 == unlock, 1 == lock */
115 int mode); /* 0 == step, 1 == continue */
116
117
107 118
108 #endif /* DBG_THREADS_API_INCLUDED */ 119 #endif /* DBG_THREADS_API_INCLUDED */