1 /*
2 * Copyright 2008 Jacek Caban for CodeWeavers
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19 import "ocidl.idl";
20 import "activscp.idl";
21 /* import "dbgprop.idl"; */
22
23 interface IDebugDocumentContext;
24 interface IRemoteDebugApplication;
25
26 /* FIXME: */
27 interface IEnumDebugStackFrames;
28 interface IDebugStackFrame;
29 interface IApplicationDebugger;
30 interface IEnumRemoteDebugApplicationThreads;
31 interface IDebugApplicationNode;
32 interface IEnumDebugExpressionContexts;
33 interface IDebugApplicationThread;
34 interface IDebugSyncOperation;
35 interface IDebugAsyncOperation;
36 interface IDebugStackFrameSniffer;
37 interface IDebugThreadCall32;
38 interface IActiveScriptErrorDebug;
39 interface IProvideExpressionContexts;
40
41 typedef enum tagBREAKPOINT_STATE {
42 BREAKPOINT_DELETED,
43 BREAKPOINT_DISABLED,
44 BREAKPOINT_ENABLED
45 } BREAKPOINT_STATE;
46
47 typedef DWORD APPBREAKFLAGS;
48
49 typedef enum tagBREAKREASON {
50 BREAKREASON_STEP,
51 BREAKREASON_BREAKPOINT,
52 BREAKREASON_DEBUGGER_BLOCK,
53 BREAKREASON_HOST_INITIATED,
54 BREAKREASON_LANGUAGE_INITIATED,
55 BREAKREASON_DEBUGGER_HALT,
56 BREAKREASON_ERROR,
57 BREAKREASON_JIT
58 } BREAKREASON;
59
60 typedef enum tagBREAKRESUME_ACTION {
61 BREAKRESUMEACTION_ABORT,
62 BREAKRESUMEACTION_CONTINUE,
63 BREAKRESUMEACTION_STEP_INTO,
64 BREAKRESUMEACTION_STEP_OVER,
65 BREAKRESUMEACTION_STEP_OUT,
66 BREAKRESUMEACTION_IGNORE
67 } BREAKRESUMEACTION;
68
69 typedef enum tagDOCUMENTNAMETYPE {
70 DOCUMENTNAMETYPE_APPNODE,
71 DOCUMENTNAMETYPE_TITLE,
72 DOCUMENTNAMETYPE_FILE_TAIL,
73 DOCUMENTNAMETYPE_URL
74 } DOCUMENTNAMETYPE;
75
76 typedef enum tagERRORRESUMEACTION {
77 ERRORRESUMEACTION_ReexecuteErrorStatement,
78 ERRORRESUMEACTION_AbortCallAndReturnErrorToCaller,
79 ERRORRESUMEACTION_SkipErrorStatement,
80 } ERRORRESUMEACTION;
81
82 /************************************************************
83 * interface IDebugDocumentInfo
84 */
85 [
86 object,
87 uuid(51973c1f-cb0c-11d0-b5c9-00a0244a0e7a),
88 pointer_default(unique)
89 ]
90 interface IDebugDocumentInfo : IUnknown
91 {
92 HRESULT GetName(
93 [in] DOCUMENTNAMETYPE dnt,
94 [out] BSTR *pbstrName);
95
96 HRESULT GetDocumentClassId(
97 [out] CLSID *pclsidDocument);
98 }
99
100 /************************************************************
101 * interface IDebugDocument
102 */
103 [
104 object,
105 uuid(51973c21-cb0c-11d0-b5c9-00a0244a0e7a),
106 pointer_default(unique)
107 ]
108 interface IDebugDocument : IDebugDocumentInfo
109 {
110 }
111
112 /************************************************************
113 * interface IDebugCodeContext
114 */
115 [
116 object,
117 uuid(51973c13-cb0c-11d0-b5c9-00a0244a0e7a),
118 pointer_default(unique)
119 ]
120 interface IDebugCodeContext : IUnknown
121 {
122 HRESULT GetDocumentContext(
123 [out] IDebugDocumentContext **ppsc);
124
125 HRESULT SetBreakPoint(
126 [in] BREAKPOINT_STATE bps);
127 }
128
129 /************************************************************
130 * interface IEnumDebugCodeContexts
131 */
132 [
133 object,
134 uuid(51973c1d-cb0c-11d0-b5c9-00a0244a0e7a),
135 pointer_default(unique)
136 ]
137 interface IEnumDebugCodeContexts : IUnknown
138 {
139 HRESULT Next(
140 [in] ULONG celt,
141 [out] IDebugCodeContext **pscc,
142 [out] ULONG *pceltFetched);
143
144 HRESULT Skip(
145 [in] ULONG celt);
146
147 HRESULT Reset();
148
149 HRESULT Clone(
150 [out] IEnumDebugCodeContexts **ppescc);
151 }
152
153 /************************************************************
154 * interface IDebugDocumentContext
155 */
156 [
157 object,
158 uuid(51973c28-cb0c-11d0-b5c9-00a0244a0e7a),
159 pointer_default(unique)
160 ]
161 interface IDebugDocumentContext : IUnknown
162 {
163 HRESULT GetDocument(
164 [out] IDebugDocument **ppsd);
165
166 HRESULT EnumCodeContexts(
167 [out] IEnumDebugCodeContexts **ppescc);
168 }
169
170 /************************************************************
171 * interface IRemoteDebugApplicationThread
172 */
173 [
174 object,
175 uuid(51973c37-cb0c-11d0-b5c9-00a0244a0e7a),
176 pointer_default(unique)
177 ]
178 interface IRemoteDebugApplicationThread : IUnknown
179 {
180 HRESULT GetSystemThreadId(
181 [out] DWORD *dwThreadId);
182
183 HRESULT GetApplication(
184 [out] IRemoteDebugApplication **pprda);
185
186 HRESULT EnumStackFrames(
187 [out] IEnumDebugStackFrames **ppedsf);
188
189 HRESULT GetDescription(
190 [out] BSTR *pbstrDescription,
191 [out] BSTR *pbstrState);
192
193 HRESULT SetNextStatement(
194 [in] IDebugStackFrame *pStackFrame,
195 [in] IDebugCodeContext *pCodeContext);
196
197 HRESULT GetState(
198 [out] DWORD *pState);
199
200 HRESULT Suspend(
201 [out] DWORD *pdwCount);
202
203 HRESULT Resume(
204 [out] DWORD *pdwCount);
205
206 HRESULT GetSuspendCount(
207 [out] DWORD *pdwCount);
208 }
209
210 /************************************************************
211 * interface IRemoteDebugApplication
212 */
213 [
214 object,
215 uuid(51973c30-cb0c-11d0-b5c9-00a0244Aae7a),
216 pointer_default(unique)
217 ]
218 interface IRemoteDebugApplication : IUnknown
219 {
220 HRESULT ResumeFromBreakPoint(
221 [in] IRemoteDebugApplicationThread *prptFocus,
222 [in] BREAKRESUMEACTION bra,
223 [in] ERRORRESUMEACTION era);
224
225 HRESULT CauseBreak();
226
227 HRESULT ConnectDebugger(
228 [in] IApplicationDebugger *pad);
229
230 HRESULT DisconnectDebugger();
231
232 HRESULT GetDebugger(
233 [out] IApplicationDebugger **pad);
234
235 HRESULT CreateInstanceAtApplication(
236 [in] REFCLSID rclsid,
237 [in] IUnknown *pUnkOuter,
238 [in] DWORD dwClsContext,
239 [in] REFIID riid,
240 [out, iid_is(riid)] IUnknown **ppvObject);
241
242 HRESULT QueryAlive();
243
244 HRESULT EnumThreads(
245 [out] IEnumRemoteDebugApplicationThreads **pperdat);
246
247 HRESULT GetName(
248 [out] BSTR *pbstrName);
249
250 HRESULT GetRootNode(
251 [out] IDebugApplicationNode **ppdanRoot);
252
253 HRESULT EnumGlobalExpressionContexts(
254 [out] IEnumDebugExpressionContexts **ppedec);
255 }
256
257 /************************************************************
258 * interface IDebugApplication32
259 */
260 [
261 object,
262 uuid(51973c32-cb0c-11d0-b5c9-00a0244a0e7a),
263 pointer_default(unique),
264 local
265 ]
266 interface IDebugApplication32 : IRemoteDebugApplication
267 {
268 HRESULT SetName(
269 [in] LPCOLESTR pstrName);
270
271 HRESULT StepOutComplete();
272
273 HRESULT DebugOutput(
274 [in] LPCOLESTR pstr);
275
276 HRESULT StartDebugSession();
277
278 HRESULT HandleBreakPoint(
279 [in] BREAKREASON br,
280 [out] BREAKRESUMEACTION *pbra);
281
282 HRESULT Close();
283
284 HRESULT GetBreakFlags(
285 [out] APPBREAKFLAGS *pabf,
286 [out] IRemoteDebugApplicationThread **pprdatSteppingThread);
287
288 HRESULT GetCurrentThread(
289 [out] IDebugApplicationThread **pat);
290
291 HRESULT CreateAsyncDebugOperation(
292 [in] IDebugSyncOperation *psdo,
293 [out] IDebugAsyncOperation **ppado);
294
295 HRESULT AddStackFrameSniffer(
296 [in] IDebugStackFrameSniffer *pdsfs,
297 [out] DWORD *pdwCookie);
298
299 HRESULT RemoveStackFrameSniffer(
300 [in] DWORD dwCookie);
301
302 HRESULT QueryCurrentThreadIsDebuggerThread();
303
304 HRESULT SynchronousCallInDebuggerThread(
305 [in] IDebugThreadCall32 *pptc,
306 [in] DWORD dwParam1,
307 [in] DWORD dwParam2,
308 [in] DWORD dwParam3);
309
310 HRESULT CreateApplicationNode(
311 [out] IDebugApplicationNode **ppdanNew);
312
313 HRESULT FireDebuggerEvent(
314 [in] REFGUID riid,
315 [in] IUnknown *punk);
316
317 HRESULT HandleRuntimeError(
318 [in] IActiveScriptErrorDebug *pErrorDebug,
319 [in] IActiveScriptSite *pScriptSite,
320 [out] BREAKRESUMEACTION *pbra,
321 [out] ERRORRESUMEACTION *perra,
322 [out] BOOL *pfCallOnScriptError);
323
324 BOOL FCanJitDebug();
325
326 BOOL FIsAutoJitDebugEnabled();
327
328 HRESULT AddGlobalExpressionContextProvider(
329 [in] IProvideExpressionContexts *pdsfs,
330 [out] DWORD *pdwCookie);
331
332 HRESULT RemoveGlobalExpressionContextProvider(
333 [in] DWORD dwCookie);
334 }
335
336 /************************************************************
337 * interface IActiveScriptSiteDebug32
338 */
339 [
340 object,
341 uuid(51973c11-cb0c-11d0-b5c9-00a0244a0e7a),
342 pointer_default(unique),
343 local
344 ]
345 interface IActiveScriptSiteDebug32 : IUnknown
346 {
347 HRESULT GetDocumentContextFromPosition(
348 [in] DWORD dwSourceContext,
349 [in] ULONG uCharacterOffset,
350 [in] ULONG uNumChars,
351 [out] IDebugDocumentContext **ppsc);
352
353 HRESULT GetApplication(
354 [out] IDebugApplication32 **ppda);
355
356 HRESULT GetRootApplicationNode(
357 [out] IDebugApplicationNode **ppdanRoot);
358
359 HRESULT OnScriptErrorDebug(
360 [in] IActiveScriptErrorDebug *pErrorDebug,
361 [out] BOOL *pfEnterDebugger,
362 [out] BOOL *pfCallOnScriptErrorWhenContinuing);
363 }
364
365 cpp_quote("#ifndef DISABLE_ACTIVDBG_INTERFACE_WRAPPERS")
366 cpp_quote("#ifdef _WIN64")
367
368 cpp_quote("#define IActiveScriptSiteDebug IActiveScriptSiteDebug64")
369 cpp_quote("#define IID_IActiveScriptSiteDebug IID_IActiveScriptSiteDebug64")
370
371 cpp_quote("#define IDebugApplication IDebugApplication64")
372 cpp_quote("#define IID_IDebugApplication IID_IDebugApplication64")
373
374 cpp_quote("#else")
375
376 cpp_quote("#define IActiveScriptSiteDebug IActiveScriptSiteDebug32")
377 cpp_quote("#define IID_IActiveScriptSiteDebug IID_IActiveScriptSiteDebug32")
378
379 cpp_quote("#define IDebugApplication IDebugApplication32")
380 cpp_quote("#define IID_IDebugApplication IID_IDebugApplication32")
381
382 cpp_quote("#endif")
383 cpp_quote("#endif")
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.