1 /* local type decs. and macro defs.
3 Copyright 1993 Free Software Foundation, Inc.
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
21 #include "udiphcfg.h" /* Get host specific configuration */
22 #include "udiptcfg.h" /* Get target specific configuration */
24 /* Here are all of the CPU Families for which UDI is currently defined */
25 #define Am29K 1 /* AMD's Am290xx and Am292xx parts */
27 typedef UDIInt UDIError
;
28 typedef UDIInt UDISessionId
;
29 typedef UDIInt UDIPId
;
30 typedef UDIInt UDIStepType
;
31 typedef UDIInt UDIBreakType
;
32 typedef UDIUInt UDIBreakId
;
33 typedef UDIUInt UDIMode
;
54 /* Values for UDIStepType parameters */
55 #define UDIStepNatural 0x0000
56 #define UDIStepOverTraps 0x0001
57 #define UDIStepOverCalls 0x0002
58 #define UDIStepInRange 0x0004
59 #define UDIStepNatural 0x0000
61 /* Values for UDIBreakType parameters */
62 #define UDIBreakFlagExecute 0x0001
63 #define UDIBreakFlagRead 0x0002
64 #define UDIBreakFlagWrite 0x0004
65 #define UDIBreakFlagFetch 0x0008
67 /* Special values for UDIWait MaxTime parameter */
68 #define UDIWaitForever (UDIInt32) -1 /* Infinite time delay */
70 /* Special values for PId */
71 #define UDIProcessProcessor -1 /* Raw Hardware, if possible */
73 /* Values for UDIWait StopReason */
74 #define UDIGrossState 0xff
75 #define UDITrapped 0 /* Fine state - which trap */
76 #define UDINotExecuting 1
83 #define UDIStdoutReady 8 /* fine state - size */
84 #define UDIStderrReady 9 /* fine state - size */
85 #define UDIStdinNeeded 10 /* fine state - size */
86 #define UDIStdinModeX 11 /* fine state - mode */
87 #define UDIBreak 12 /* Fine state - Breakpoint Id */
88 #define UDIExited 13 /* Fine state - exit code */
90 /* Enumerate the return values from the callback function
93 #define UDITerminateEnumeration 0
94 #define UDIContinueEnumeration 1
96 /* Enumerate values for Terminate parameter to UDIDisconnect */
97 #define UDITerminateSession 1
98 #define UDIContinueSession 0
101 #define UDINoError 0 /* No error occured */
102 #define UDIErrorNoSuchConfiguration 1
103 #define UDIErrorCantHappen 2
104 #define UDIErrorCantConnect 3
105 #define UDIErrorNoSuchConnection 4
106 #define UDIErrorNoConnection 5
107 #define UDIErrorCantOpenConfigFile 6
108 #define UDIErrorCantStartTIP 7
109 #define UDIErrorConnectionUnavailable 8
110 #define UDIErrorTryAnotherTIP 9
111 #define UDIErrorExecutableNotTIP 10
112 #define UDIErrorInvalidTIPOption 11
113 #define UDIErrorCantDisconnect 12
114 #define UDIErrorUnknownError 13
115 #define UDIErrorCantCreateProcess 14
116 #define UDIErrorNoSuchProcess 15
117 #define UDIErrorUnknownResourceSpace 16
118 #define UDIErrorInvalidResource 17
119 #define UDIErrorUnsupportedStepType 18
120 #define UDIErrorCantSetBreakpoint 19
121 #define UDIErrorTooManyBreakpoints 20
122 #define UDIErrorInvalidBreakId 21
123 #define UDIErrorNoMoreBreakIds 22
124 #define UDIErrorUnsupportedService 23
125 #define UDIErrorTryAgain 24
126 #define UDIErrorIPCLimitation 25
127 #define UDIErrorIncomplete 26
128 #define UDIErrorAborted 27
129 #define UDIErrorTransDone 28
130 #define UDIErrorCantAccept 29
131 #define UDIErrorTransInputNeeded 30
132 #define UDIErrorTransModeX 31
133 #define UDIErrorInvalidSize 32
134 #define UDIErrorBadConfigFileEntry 33
135 #define UDIErrorIPCInternal 34
138 /****************************************************************** PROCEDURES
141 UDIError UDIConnect
UDIParams((
142 char *Configuration
, /* In */
143 UDISessionId
*Session
/* Out */
146 UDIError UDIDisconnect
UDIParams((
147 UDISessionId Session
, /* In */
148 UDIBool Terminate
/* In */
151 UDIError UDISetCurrentConnection
UDIParams((
152 UDISessionId Session
/* In */
155 UDIError UDICapabilities
UDIParams((
156 UDIUInt32
*TIPId
, /* Out */
157 UDIUInt32
*TargetId
, /* Out */
158 UDIUInt32 DFEId
, /* In */
159 UDIUInt32 DFE
, /* In */
160 UDIUInt32
*TIP
, /* Out */
161 UDIUInt32
*DFEIPCId
, /* Out */
162 UDIUInt32
*TIPIPCId
, /* Out */
163 char *TIPString
/* Out */
166 UDIError UDIEnumerateTIPs
UDIParams((
167 UDIInt (*UDIETCallback
) /* In */
168 UDIParams(( char *Configuration
)) /* In to callback() */
171 UDIError UDIGetErrorMsg
UDIParams((
172 UDIError ErrorCode
, /* In */
173 UDISizeT MsgSize
, /* In */
175 UDISizeT
*CountDone
/* Out */
178 UDIError UDIGetTargetConfig
UDIParams((
179 UDIMemoryRange KnownMemory
[], /* Out */
180 UDIInt
*NumberOfRanges
, /* In/Out */
181 UDIUInt32 ChipVersions
[], /* Out */
182 UDIInt
*NumberOfChips
/* In/Out */
185 UDIError UDICreateProcess
UDIParams((
186 UDIPId
*PId
/* Out */
189 UDIError UDISetCurrentProcess
UDIParams((
193 UDIError UDIDestroyProcess
UDIParams((
197 UDIError UDIInitializeProcess
UDIParams((
198 UDIMemoryRange ProcessMemory
[], /* In */
199 UDIInt NumberOfRanges
, /* In */
200 UDIResource EntryPoint
, /* In */
201 CPUSizeT StackSizes
[], /* In */
202 UDIInt NumberOfStacks
, /* In */
203 char *ArgString
/* In */
206 UDIError UDIRead
UDIParams((
207 UDIResource From
, /* In */
208 UDIHostMemPtr To
, /* Out */
209 UDICount Count
, /* In */
210 UDISizeT Size
, /* In */
211 UDICount
*CountDone
, /* Out */
212 UDIBool HostEndian
/* In */
215 UDIError UDIWrite
UDIParams((
216 UDIHostMemPtr From
, /* In */
217 UDIResource To
, /* In */
218 UDICount Count
, /* In */
219 UDISizeT Size
, /* In */
220 UDICount
*CountDone
, /* Out */
221 UDIBool HostEndian
/* In */
224 UDIError UDICopy
UDIParams((
225 UDIResource From
, /* In */
226 UDIResource To
, /* In */
227 UDICount Count
, /* In */
228 UDISizeT Size
, /* In */
229 UDICount
*CountDone
, /* Out */
230 UDIBool Direction
/* In */
233 UDIError UDIExecute
UDIParams((
237 UDIError UDIStep
UDIParams((
238 UDIUInt32 Steps
, /* In */
239 UDIStepType StepType
, /* In */
240 UDIRange Range
/* In */
243 UDIVoid UDIStop
UDIParams((
247 UDIError UDIWait
UDIParams((
248 UDIInt32 MaxTime
, /* In */
249 UDIPId
*PId
, /* Out */
250 UDIUInt32
*StopReason
/* Out */
253 UDIError UDISetBreakpoint
UDIParams((
254 UDIResource Addr
, /* In */
255 UDIInt32 PassCount
, /* In */
256 UDIBreakType Type
, /* In */
257 UDIBreakId
*BreakId
/* Out */
260 UDIError UDIQueryBreakpoint
UDIParams((
261 UDIBreakId BreakId
, /* In */
262 UDIResource
*Addr
, /* Out */
263 UDIInt32
*PassCount
, /* Out */
264 UDIBreakType
*Type
, /* Out */
265 UDIInt32
*CurrentCount
/* Out */
268 UDIError UDIClearBreakpoint
UDIParams((
269 UDIBreakId BreakId
/* In */
272 UDIError UDIGetStdout
UDIParams((
273 UDIHostMemPtr Buf
, /* Out */
274 UDISizeT BufSize
, /* In */
275 UDISizeT
*CountDone
/* Out */
278 UDIError UDIGetStderr
UDIParams((
279 UDIHostMemPtr Buf
, /* Out */
280 UDISizeT BufSize
, /* In */
281 UDISizeT
*CountDone
/* Out */
284 UDIError UDIPutStdin
UDIParams((
285 UDIHostMemPtr Buf
, /* In */
286 UDISizeT Count
, /* In */
287 UDISizeT
*CountDone
/* Out */
290 UDIError UDIStdinMode
UDIParams((
291 UDIMode
*Mode
/* Out */
294 UDIError UDIPutTrans
UDIParams((
295 UDIHostMemPtr Buf
, /* In */
296 UDISizeT Count
, /* In */
297 UDISizeT
*CountDone
/* Out */
300 UDIError UDIGetTrans
UDIParams((
301 UDIHostMemPtr Buf
, /* Out */
302 UDISizeT BufSize
, /* In */
303 UDISizeT
*CountDone
/* Out */
306 UDIError UDITransMode
UDIParams((
307 UDIMode
*Mode
/* Out */