annotate packages/hal/common/current/include/dbg-threads-api.h @ 54:f10165814f1e ecos-sw-1999-11-19

Merge from eCos master repository on 1999-11-19-22:24:39-GMT
author jlarmour
date Fri, 19 Nov 1999 23:37:56 +0000
parents 443894e2e912
children c38311975d4f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
1 #if !defined(DBG_THREADS_API_INCLUDED)
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
2 #define DBG_THREADS_API_INCLUDED 1
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
3 /* These are the calls used to extract operating system specific information
54
f10165814f1e Merge from eCos master repository on 1999-11-19-22:24:39-GMT
jlarmour
parents: 2
diff changeset
4 * used in supporting thread aware debugging.
f10165814f1e Merge from eCos master repository on 1999-11-19-22:24:39-GMT
jlarmour
parents: 2
diff changeset
5 * The Operating Environment being debugged needs to supply these functions.
f10165814f1e Merge from eCos master repository on 1999-11-19-22:24:39-GMT
jlarmour
parents: 2
diff changeset
6 *
f10165814f1e Merge from eCos master repository on 1999-11-19-22:24:39-GMT
jlarmour
parents: 2
diff changeset
7 * This header is not to be included by user code
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
8 */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
9
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
10 /*
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
11 * Copyright (c) 1998,1999 Cygnus Solutions
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
12 *
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
13 * The authors hereby grant permission to use, copy, modify, distribute,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
14 * and license this software and its documentation for any purpose, provided
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
15 * that existing copyright notices are retained in all copies and that this
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
16 * notice is included verbatim in any distributions. No written agreement,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
17 * license, or royalty fee is required for any of the authorized uses.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
18 * Modifications to this software may be copyrighted by their authors
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
19 * and need not follow the licensing terms described here, provided that
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
20 * the new terms are clearly indicated on the first page of each file where
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
21 * they apply.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
22 */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
23
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
24 #include <cyg/infra/cyg_type.h> /* externC */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
25
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
26 #define has_thread_void 0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
27 #define has_thread_current 1
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
28 #define has_thread_registers 2
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
29 #define has_thread_reg_change 4
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
30 #define has_thread_list 8
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
31 #define has_thread_info 16
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
32
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
33 typedef unsigned char threadref[8] ;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
34
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
35 struct dbg_capabilities
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
36 {
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
37 unsigned long mask1 ;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
38 } ;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
39
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
40
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
41 /* fill in the list of thread aware capabilities */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
42 extern int dbg_thread_capabilities(struct dbg_capabilities * cbp) ;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
43
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
44
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
45 /* Fillin the identifier of the current thread */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
46 /* return 1 if defined, 0 if not defined */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
47 extern int dbg_currthread(threadref * varparm) ;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
48
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
49 /* Return the unique ID number of the current thread. */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
50 extern int dbg_currthread_id(void);
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
51
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
52 /* get the first or next member of the list of known threads */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
53 extern int dbg_threadlist(int startflag,
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
54 threadref * lastthreadid,
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
55 threadref * next_thread
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
56 ) ;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
57
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
58 /* return 1 if next_threadid has been filled in with a value */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
59 /* return 0 if there are none or no more */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
60
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
61 /* The O.S can fill in the following information about a thread when queried.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
62 The structure of thise strings is determined by the O.S.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
63 It is display oriented, so figure out what the users need to see.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
64 Nulls are OK but GDB will fill some not so meaningful data.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
65 These pointers may be in the calles private structures, the info will
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
66 get copied immediatly after the call to retreive it.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
67 */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
68 struct cygmon_thread_debug_info
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
69 {
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
70 threadref thread_id ;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
71 int context_exists ; /* To the point where examining its state,
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
72 registers and stack makes sense to GDB */
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
73 char * thread_display ; /* As shown in thread status window, name, state */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
74 char * unique_thread_name ; /* human readable identifier, window label */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
75 char * more_display ; /* more detailed info about thread.
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
76 priority, queuedepth, state, stack usage, statistics */
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
77 } ;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
78
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
79
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
80
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
81
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
82 extern int dbg_threadinfo(
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
83 threadref * threadid,
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
84 struct cygmon_thread_debug_info * info) ;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
85
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
86 /* Return 1 if threadid is defined and info copied, 0 otherwise */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
87
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
88 /* The O.S should fillin the array of registers using values from the
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
89 saves context. The array MUST be in GDB register save order even if
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
90 the saved context is different or smaller. Do not alter the values of
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
91 registers which are NOT in the O.S. thread context. Their default values
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
92 have already been assigned.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
93 */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
94
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
95 extern int dbg_getthreadreg(
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
96 threadref * osthreadid,
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
97 int regcount, /* count of registers in the array */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
98 void * regval) ; /* fillin this array */
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
99
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
100
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
101 /* The O.S. should scan through this list of registers which are in
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
102 GDB order and the O.S. should replace the values of all registers
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
103 which are defined in the saved context of thread or process identified
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
104 by osthreadid. Return 0 if the threadis does not map to a known
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
105 process or other error. Return 1 if the setting is successful. */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
106
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
107 extern int dbg_setthreadreg(
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
108 threadref * osthreadid,
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
109 int regcount , /* number of registers */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
110 void * regval) ;
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
111
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
112 /* Control over OS scheduler. With the scheduler locked it should not
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
113 perform any rescheduling in response to interrupts. */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
114 externC int dbg_scheduler(
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
115 threadref * osthreadid,
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
116 int lock, /* 0 == unlock, 1 == lock */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
117 int mode); /* 0 == step, 1 == continue */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
118
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
119
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
120
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
121 #endif /* DBG_THREADS_API_INCLUDED */