Mercurial > ecos
annotate packages/hal/common/current/include/dbg-threads-api.h @ 3292:7f8e529b4d82 default tip
Fix FREESCALE_EDMA_NBYTES_MLOFFYES_MLOFF() so it works with negative offsets.
| author | vae |
|---|---|
| date | Wed, 29 Apr 2015 23:31:48 +0000 |
| parents | 74dbf4c3f2e1 |
| children |
| rev | line source |
|---|---|
|
64
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
54
diff
changeset
|
1 //======================================================================== |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
54
diff
changeset
|
2 // |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
54
diff
changeset
|
3 // dbg-threads-api.h |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
54
diff
changeset
|
4 // |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
54
diff
changeset
|
5 // Supports thread-aware debugging |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
54
diff
changeset
|
6 // |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
54
diff
changeset
|
7 //======================================================================== |
|
2729
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
210
diff
changeset
|
8 // ####ECOSGPLCOPYRIGHTBEGIN#### |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
210
diff
changeset
|
9 // ------------------------------------------- |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
210
diff
changeset
|
10 // This file is part of eCos, the Embedded Configurable Operating System. |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
210
diff
changeset
|
11 // Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. |
|
208
e0c0827131d1
Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents:
156
diff
changeset
|
12 // |
|
2729
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
210
diff
changeset
|
13 // eCos is free software; you can redistribute it and/or modify it under |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
210
diff
changeset
|
14 // the terms of the GNU General Public License as published by the Free |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
210
diff
changeset
|
15 // Software Foundation; either version 2 or (at your option) any later |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
210
diff
changeset
|
16 // version. |
|
208
e0c0827131d1
Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents:
156
diff
changeset
|
17 // |
|
2729
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
210
diff
changeset
|
18 // eCos is distributed in the hope that it will be useful, but WITHOUT |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
210
diff
changeset
|
19 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
210
diff
changeset
|
20 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
210
diff
changeset
|
21 // for more details. |
|
208
e0c0827131d1
Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents:
156
diff
changeset
|
22 // |
|
2729
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
210
diff
changeset
|
23 // You should have received a copy of the GNU General Public License |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
210
diff
changeset
|
24 // along with eCos; if not, write to the Free Software Foundation, Inc., |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
210
diff
changeset
|
25 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
208
e0c0827131d1
Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents:
156
diff
changeset
|
26 // |
|
2729
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
210
diff
changeset
|
27 // As a special exception, if other files instantiate templates or use |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
210
diff
changeset
|
28 // macros or inline functions from this file, or you compile this file |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
210
diff
changeset
|
29 // and link it with other works to produce a work based on this file, |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
210
diff
changeset
|
30 // this file does not by itself cause the resulting work to be covered by |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
210
diff
changeset
|
31 // the GNU General Public License. However the source code for this file |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
210
diff
changeset
|
32 // must still be made available in accordance with section (3) of the GNU |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
210
diff
changeset
|
33 // General Public License v2. |
|
208
e0c0827131d1
Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents:
156
diff
changeset
|
34 // |
|
2729
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
210
diff
changeset
|
35 // This exception does not invalidate any other reasons why a work based |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
210
diff
changeset
|
36 // on this file might be covered by the GNU General Public License. |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
210
diff
changeset
|
37 // ------------------------------------------- |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
210
diff
changeset
|
38 // ####ECOSGPLCOPYRIGHTEND#### |
|
64
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
54
diff
changeset
|
39 //======================================================================== |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
54
diff
changeset
|
40 //#####DESCRIPTIONBEGIN#### |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
54
diff
changeset
|
41 // |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
54
diff
changeset
|
42 // Author(s): Red Hat, nickg |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
54
diff
changeset
|
43 // Contributors: Red Hat, nickg |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
54
diff
changeset
|
44 // Date: 1998-08-25 |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
54
diff
changeset
|
45 // Purpose: |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
54
diff
changeset
|
46 // Description: These are the calls used to extract operating system |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
54
diff
changeset
|
47 // specific information used in supporting thread aware |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
54
diff
changeset
|
48 // debugging. The Operating Environment being debugged |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
54
diff
changeset
|
49 // needs to supply these functions. |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
54
diff
changeset
|
50 // Usage: This header is not to be included by user code. |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
54
diff
changeset
|
51 // |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
54
diff
changeset
|
52 //####DESCRIPTIONEND#### |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
54
diff
changeset
|
53 // |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
54
diff
changeset
|
54 //======================================================================== |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
54
diff
changeset
|
55 |
| 0 | 56 #if !defined(DBG_THREADS_API_INCLUDED) |
| 57 #define DBG_THREADS_API_INCLUDED 1 | |
| 58 | |
| 2 | 59 #include <cyg/infra/cyg_type.h> /* externC */ |
| 60 | |
| 0 | 61 #define has_thread_void 0 |
| 62 #define has_thread_current 1 | |
| 63 #define has_thread_registers 2 | |
| 64 #define has_thread_reg_change 4 | |
| 65 #define has_thread_list 8 | |
| 66 #define has_thread_info 16 | |
| 67 | |
| 68 typedef unsigned char threadref[8] ; | |
| 69 | |
| 70 struct dbg_capabilities | |
| 71 { | |
| 72 unsigned long mask1 ; | |
| 73 } ; | |
| 74 | |
| 75 | |
| 76 /* fill in the list of thread aware capabilities */ | |
|
105
5a0cc6c243a9
Merge from eCos master repository on 2000-06-30-08:18:49-BST
jlarmour
parents:
66
diff
changeset
|
77 externC int dbg_thread_capabilities(struct dbg_capabilities * cbp) ; |
| 0 | 78 |
| 79 | |
| 80 /* Fillin the identifier of the current thread */ | |
| 81 /* return 1 if defined, 0 if not defined */ | |
|
105
5a0cc6c243a9
Merge from eCos master repository on 2000-06-30-08:18:49-BST
jlarmour
parents:
66
diff
changeset
|
82 externC int dbg_currthread(threadref * varparm) ; |
| 0 | 83 |
|
156
b939e9cada46
Merge from eCos master repository on 2001-03-29-21:44:39-BST
jlarmour
parents:
105
diff
changeset
|
84 /* Return the unique ID number of a given thread. */ |
|
b939e9cada46
Merge from eCos master repository on 2001-03-29-21:44:39-BST
jlarmour
parents:
105
diff
changeset
|
85 /* Return 0 if not valid. */ |
|
b939e9cada46
Merge from eCos master repository on 2001-03-29-21:44:39-BST
jlarmour
parents:
105
diff
changeset
|
86 externC int dbg_thread_id(threadref *threadid); |
|
b939e9cada46
Merge from eCos master repository on 2001-03-29-21:44:39-BST
jlarmour
parents:
105
diff
changeset
|
87 |
| 0 | 88 /* Return the unique ID number of the current thread. */ |
|
105
5a0cc6c243a9
Merge from eCos master repository on 2000-06-30-08:18:49-BST
jlarmour
parents:
66
diff
changeset
|
89 externC int dbg_currthread_id(void); |
| 0 | 90 |
| 91 /* get the first or next member of the list of known threads */ | |
|
105
5a0cc6c243a9
Merge from eCos master repository on 2000-06-30-08:18:49-BST
jlarmour
parents:
66
diff
changeset
|
92 externC int dbg_threadlist(int startflag, |
|
5a0cc6c243a9
Merge from eCos master repository on 2000-06-30-08:18:49-BST
jlarmour
parents:
66
diff
changeset
|
93 threadref * lastthreadid, |
|
5a0cc6c243a9
Merge from eCos master repository on 2000-06-30-08:18:49-BST
jlarmour
parents:
66
diff
changeset
|
94 threadref * next_thread |
|
5a0cc6c243a9
Merge from eCos master repository on 2000-06-30-08:18:49-BST
jlarmour
parents:
66
diff
changeset
|
95 ) ; |
| 0 | 96 |
| 97 /* return 1 if next_threadid has been filled in with a value */ | |
| 98 /* return 0 if there are none or no more */ | |
| 99 | |
| 100 /* The O.S can fill in the following information about a thread when queried. | |
| 101 The structure of thise strings is determined by the O.S. | |
| 102 It is display oriented, so figure out what the users need to see. | |
| 103 Nulls are OK but GDB will fill some not so meaningful data. | |
| 104 These pointers may be in the calles private structures, the info will | |
| 105 get copied immediatly after the call to retreive it. | |
| 106 */ | |
| 107 struct cygmon_thread_debug_info | |
| 108 { | |
| 109 threadref thread_id ; | |
| 110 int context_exists ; /* To the point where examining its state, | |
| 2 | 111 registers and stack makes sense to GDB */ |
| 0 | 112 char * thread_display ; /* As shown in thread status window, name, state */ |
| 113 char * unique_thread_name ; /* human readable identifier, window label */ | |
| 114 char * more_display ; /* more detailed info about thread. | |
| 2 | 115 priority, queuedepth, state, stack usage, statistics */ |
| 0 | 116 } ; |
| 117 | |
| 118 | |
| 119 | |
| 120 | |
|
105
5a0cc6c243a9
Merge from eCos master repository on 2000-06-30-08:18:49-BST
jlarmour
parents:
66
diff
changeset
|
121 externC int dbg_threadinfo( |
| 2 | 122 threadref * threadid, |
| 123 struct cygmon_thread_debug_info * info) ; | |
| 0 | 124 |
| 125 /* Return 1 if threadid is defined and info copied, 0 otherwise */ | |
| 126 | |
| 127 /* The O.S should fillin the array of registers using values from the | |
| 128 saves context. The array MUST be in GDB register save order even if | |
| 129 the saved context is different or smaller. Do not alter the values of | |
| 130 registers which are NOT in the O.S. thread context. Their default values | |
| 131 have already been assigned. | |
| 132 */ | |
| 133 | |
|
105
5a0cc6c243a9
Merge from eCos master repository on 2000-06-30-08:18:49-BST
jlarmour
parents:
66
diff
changeset
|
134 externC int dbg_getthreadreg( |
| 2 | 135 threadref * osthreadid, |
| 136 int regcount, /* count of registers in the array */ | |
| 137 void * regval) ; /* fillin this array */ | |
| 0 | 138 |
| 139 | |
| 140 /* The O.S. should scan through this list of registers which are in | |
| 141 GDB order and the O.S. should replace the values of all registers | |
| 142 which are defined in the saved context of thread or process identified | |
| 143 by osthreadid. Return 0 if the threadis does not map to a known | |
| 144 process or other error. Return 1 if the setting is successful. */ | |
| 145 | |
|
105
5a0cc6c243a9
Merge from eCos master repository on 2000-06-30-08:18:49-BST
jlarmour
parents:
66
diff
changeset
|
146 externC int dbg_setthreadreg( |
| 2 | 147 threadref * osthreadid, |
| 148 int regcount , /* number of registers */ | |
| 149 void * regval) ; | |
| 150 | |
| 151 /* Control over OS scheduler. With the scheduler locked it should not | |
| 152 perform any rescheduling in response to interrupts. */ | |
| 153 externC int dbg_scheduler( | |
| 154 threadref * osthreadid, | |
| 155 int lock, /* 0 == unlock, 1 == lock */ | |
| 156 int mode); /* 0 == step, 1 == continue */ | |
| 157 | |
| 158 | |
| 0 | 159 |
| 160 #endif /* DBG_THREADS_API_INCLUDED */ |
