home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 9 / FreshFishVol9-CD2.bin / bbs / gnu / gdb-4.14-src.lha / gdb-4.14 / gdb / 29k-share / udi / udiproc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-10  |  8.0 KB  |  309 lines

  1. /* local type decs. and macro defs.
  2.  
  3.    Copyright 1993 Free Software Foundation, Inc.
  4.  
  5.    This file is part of GDB.
  6.  
  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.
  11.  
  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.
  16.    
  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., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  20.  
  21. #include "udiphcfg.h"    /* Get host specific configuration */
  22. #include "udiptcfg.h"    /* Get target specific configuration */
  23.  
  24. /* Here are all of the CPU Families for which UDI is currently defined */
  25. #define Am29K        1    /* AMD's Am290xx and Am292xx parts */
  26.  
  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;
  34.  
  35. typedef UDIStruct
  36. {            
  37.     CPUSpace    Space;
  38.     CPUOffset    Offset;
  39. } UDIResource;
  40.  
  41. typedef    UDIStruct
  42. {
  43.     CPUOffset    Low;
  44.     CPUOffset    High;
  45. } UDIRange;
  46.  
  47. typedef UDIStruct
  48. {
  49.     CPUSpace    Space;
  50.     CPUOffset    Offset;
  51.     CPUSizeT    Size;
  52.     } UDIMemoryRange;
  53.  
  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
  60.  
  61. /* Values for UDIBreakType parameters */
  62. #define UDIBreakFlagExecute    0x0001
  63. #define UDIBreakFlagRead    0x0002
  64. #define UDIBreakFlagWrite    0x0004
  65. #define UDIBreakFlagFetch    0x0008
  66.  
  67. /* Special values for UDIWait MaxTime parameter */
  68. #define UDIWaitForever    (UDIInt32) -1    /* Infinite time delay */
  69.  
  70. /* Special values for PId */
  71. #define UDIProcessProcessor    -1    /* Raw Hardware, if possible */
  72.  
  73. /* Values for UDIWait StopReason */
  74. #define UDIGrossState        0xff
  75. #define UDITrapped        0    /* Fine state - which trap */
  76. #define UDINotExecuting        1
  77. #define UDIRunning        2
  78. #define UDIStopped        3
  79. #define UDIWarned        4
  80. #define UDIStepped        5
  81. #define UDIWaiting        6
  82. #define UDIHalted        7
  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 */
  89.  
  90. /* Enumerate the return values from the callback function
  91.    for UDIEnumerateTIPs.
  92. */
  93. #define UDITerminateEnumeration    0
  94. #define UDIContinueEnumeration    1
  95.  
  96. /* Enumerate values for Terminate parameter to UDIDisconnect */
  97. #define UDITerminateSession    1
  98. #define UDIContinueSession    0
  99.  
  100. /* Error codes */
  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
  136. /* TBD */
  137.  
  138. /****************************************************************** PROCEDURES
  139. */
  140.  
  141. UDIError UDIConnect UDIParams((
  142.   char        *Configuration,        /* In */
  143.   UDISessionId    *Session        /* Out */
  144.   ));
  145.  
  146. UDIError UDIDisconnect UDIParams((
  147.   UDISessionId    Session,        /* In */
  148.   UDIBool    Terminate        /* In */
  149.   ));
  150.  
  151. UDIError UDISetCurrentConnection UDIParams((
  152.   UDISessionId    Session            /* In */
  153.   ));
  154.  
  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 */
  164.   ));
  165.  
  166. UDIError UDIEnumerateTIPs UDIParams((
  167.   UDIInt    (*UDIETCallback)    /* In */
  168.     UDIParams(( char *Configuration ))    /* In to callback() */
  169.   ));
  170.  
  171. UDIError UDIGetErrorMsg UDIParams((
  172.   UDIError    ErrorCode,        /* In */
  173.   UDISizeT    MsgSize,        /* In */
  174.   char        *Msg,            /* Out */
  175.   UDISizeT    *CountDone        /* Out */
  176.   ));
  177.  
  178. UDIError UDIGetTargetConfig UDIParams((
  179.   UDIMemoryRange KnownMemory[],        /* Out */
  180.   UDIInt    *NumberOfRanges,    /* In/Out */
  181.   UDIUInt32    ChipVersions[],        /* Out */
  182.   UDIInt    *NumberOfChips        /* In/Out */
  183.   ));
  184.  
  185. UDIError UDICreateProcess UDIParams((
  186.   UDIPId    *PId            /* Out */
  187.   ));
  188.  
  189. UDIError UDISetCurrentProcess UDIParams((
  190.   UDIPId    PId            /* In */
  191.   ));
  192.  
  193. UDIError UDIDestroyProcess UDIParams((
  194.   UDIPId    PId            /* In */
  195.   ));
  196.  
  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 */
  204.   ));
  205.  
  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 */
  213.   ));
  214.  
  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 */
  222.   ));
  223.  
  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 */
  231.   ));
  232.  
  233. UDIError UDIExecute UDIParams((
  234.   void
  235.   ));
  236.  
  237. UDIError UDIStep UDIParams((
  238.   UDIUInt32    Steps,            /* In */
  239.   UDIStepType   StepType,        /* In */
  240.   UDIRange      Range            /* In */
  241.   ));
  242.  
  243. UDIVoid UDIStop UDIParams((
  244.   void
  245.   ));
  246.  
  247. UDIError UDIWait UDIParams((
  248.   UDIInt32    MaxTime,        /* In */
  249.   UDIPId    *PId,            /* Out */
  250.   UDIUInt32    *StopReason        /* Out */
  251.   ));
  252.  
  253. UDIError UDISetBreakpoint UDIParams((
  254.   UDIResource    Addr,            /* In */
  255.   UDIInt32    PassCount,        /* In */
  256.   UDIBreakType    Type,            /* In */
  257.   UDIBreakId    *BreakId        /* Out */
  258.   ));
  259.  
  260. UDIError UDIQueryBreakpoint UDIParams((
  261.   UDIBreakId    BreakId,        /* In */
  262.   UDIResource    *Addr,            /* Out */
  263.   UDIInt32    *PassCount,        /* Out */
  264.   UDIBreakType    *Type,            /* Out */
  265.   UDIInt32    *CurrentCount        /* Out */
  266.   ));
  267.  
  268. UDIError UDIClearBreakpoint UDIParams((
  269.   UDIBreakId    BreakId            /* In */
  270.   ));
  271.  
  272. UDIError UDIGetStdout UDIParams((
  273.   UDIHostMemPtr    Buf,            /* Out */
  274.   UDISizeT    BufSize,        /* In */
  275.   UDISizeT    *CountDone        /* Out */
  276.   ));
  277.  
  278. UDIError UDIGetStderr UDIParams((
  279.   UDIHostMemPtr    Buf,            /* Out */
  280.   UDISizeT    BufSize,        /* In */
  281.   UDISizeT    *CountDone        /* Out */
  282.   ));
  283.  
  284. UDIError UDIPutStdin UDIParams((
  285.   UDIHostMemPtr    Buf,            /* In */
  286.   UDISizeT    Count,            /* In */
  287.   UDISizeT    *CountDone        /* Out */
  288.   ));
  289.  
  290. UDIError UDIStdinMode UDIParams((
  291.   UDIMode    *Mode            /* Out */
  292.   ));
  293.  
  294. UDIError UDIPutTrans UDIParams((
  295.   UDIHostMemPtr    Buf,            /* In */
  296.   UDISizeT    Count,            /* In */
  297.   UDISizeT    *CountDone        /* Out */
  298.   ));
  299.  
  300. UDIError UDIGetTrans UDIParams((
  301.   UDIHostMemPtr    Buf,            /* Out */
  302.   UDISizeT    BufSize,        /* In */
  303.   UDISizeT    *CountDone        /* Out */
  304.   ));
  305.  
  306. UDIError UDITransMode UDIParams((
  307.   UDIMode    *Mode            /* Out */
  308.   ));
  309.