loader: Don't bother checking for pthread.h existence, we require it anyway.
[wine/hacks.git] / include / activdbg.idl
blobc046ad33a95c0066233c000aef511604778e7648
1 /*
2 * Copyright 2008 Jacek Caban for CodeWeavers
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.
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.
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
19 import "ocidl.idl";
20 import "activscp.idl";
21 /* import "dbgprop.idl"; */
23 interface IDebugDocumentContext;
24 interface IRemoteDebugApplication;
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;
41 typedef enum tagBREAKPOINT_STATE {
42 BREAKPOINT_DELETED,
43 BREAKPOINT_DISABLED,
44 BREAKPOINT_ENABLED
45 } BREAKPOINT_STATE;
47 typedef DWORD APPBREAKFLAGS;
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;
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;
69 typedef enum tagDOCUMENTNAMETYPE {
70 DOCUMENTNAMETYPE_APPNODE,
71 DOCUMENTNAMETYPE_TITLE,
72 DOCUMENTNAMETYPE_FILE_TAIL,
73 DOCUMENTNAMETYPE_URL
74 } DOCUMENTNAMETYPE;
76 typedef enum tagERRORRESUMEACTION {
77 ERRORRESUMEACTION_ReexecuteErrorStatement,
78 ERRORRESUMEACTION_AbortCallAndReturnErrorToCaller,
79 ERRORRESUMEACTION_SkipErrorStatement,
80 } ERRORRESUMEACTION;
82 /************************************************************
83 * interface IDebugDocumentInfo
86 object,
87 uuid(51973c1f-cb0c-11d0-b5c9-00a0244a0e7a),
88 pointer_default(unique)
90 interface IDebugDocumentInfo : IUnknown
92 HRESULT GetName(
93 [in] DOCUMENTNAMETYPE dnt,
94 [out] BSTR *pbstrName);
96 HRESULT GetDocumentClassId(
97 [out] CLSID *pclsidDocument);
100 /************************************************************
101 * interface IDebugDocument
104 object,
105 uuid(51973c21-cb0c-11d0-b5c9-00a0244a0e7a),
106 pointer_default(unique)
108 interface IDebugDocument : IDebugDocumentInfo
112 /************************************************************
113 * interface IDebugCodeContext
116 object,
117 uuid(51973c13-cb0c-11d0-b5c9-00a0244a0e7a),
118 pointer_default(unique)
120 interface IDebugCodeContext : IUnknown
122 HRESULT GetDocumentContext(
123 [out] IDebugDocumentContext **ppsc);
125 HRESULT SetBreakPoint(
126 [in] BREAKPOINT_STATE bps);
129 /************************************************************
130 * interface IEnumDebugCodeContexts
133 object,
134 uuid(51973c1d-cb0c-11d0-b5c9-00a0244a0e7a),
135 pointer_default(unique)
137 interface IEnumDebugCodeContexts : IUnknown
139 HRESULT Next(
140 [in] ULONG celt,
141 [out] IDebugCodeContext **pscc,
142 [out] ULONG *pceltFetched);
144 HRESULT Skip(
145 [in] ULONG celt);
147 HRESULT Reset();
149 HRESULT Clone(
150 [out] IEnumDebugCodeContexts **ppescc);
153 /************************************************************
154 * interface IDebugDocumentContext
157 object,
158 uuid(51973c28-cb0c-11d0-b5c9-00a0244a0e7a),
159 pointer_default(unique)
161 interface IDebugDocumentContext : IUnknown
163 HRESULT GetDocument(
164 [out] IDebugDocument **ppsd);
166 HRESULT EnumCodeContexts(
167 [out] IEnumDebugCodeContexts **ppescc);
170 /************************************************************
171 * interface IRemoteDebugApplicationThread
174 object,
175 uuid(51973c37-cb0c-11d0-b5c9-00a0244a0e7a),
176 pointer_default(unique)
178 interface IRemoteDebugApplicationThread : IUnknown
180 HRESULT GetSystemThreadId(
181 [out] DWORD *dwThreadId);
183 HRESULT GetApplication(
184 [out] IRemoteDebugApplication **pprda);
186 HRESULT EnumStackFrames(
187 [out] IEnumDebugStackFrames **ppedsf);
189 HRESULT GetDescription(
190 [out] BSTR *pbstrDescription,
191 [out] BSTR *pbstrState);
193 HRESULT SetNextStatement(
194 [in] IDebugStackFrame *pStackFrame,
195 [in] IDebugCodeContext *pCodeContext);
197 HRESULT GetState(
198 [out] DWORD *pState);
200 HRESULT Suspend(
201 [out] DWORD *pdwCount);
203 HRESULT Resume(
204 [out] DWORD *pdwCount);
206 HRESULT GetSuspendCount(
207 [out] DWORD *pdwCount);
210 /************************************************************
211 * interface IRemoteDebugApplication
214 object,
215 uuid(51973c30-cb0c-11d0-b5c9-00a0244Aae7a),
216 pointer_default(unique)
218 interface IRemoteDebugApplication : IUnknown
220 HRESULT ResumeFromBreakPoint(
221 [in] IRemoteDebugApplicationThread *prptFocus,
222 [in] BREAKRESUMEACTION bra,
223 [in] ERRORRESUMEACTION era);
225 HRESULT CauseBreak();
227 HRESULT ConnectDebugger(
228 [in] IApplicationDebugger *pad);
230 HRESULT DisconnectDebugger();
232 HRESULT GetDebugger(
233 [out] IApplicationDebugger **pad);
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);
242 HRESULT QueryAlive();
244 HRESULT EnumThreads(
245 [out] IEnumRemoteDebugApplicationThreads **pperdat);
247 HRESULT GetName(
248 [out] BSTR *pbstrName);
250 HRESULT GetRootNode(
251 [out] IDebugApplicationNode **ppdanRoot);
253 HRESULT EnumGlobalExpressionContexts(
254 [out] IEnumDebugExpressionContexts **ppedec);
257 /************************************************************
258 * interface IDebugApplication32
261 object,
262 uuid(51973c32-cb0c-11d0-b5c9-00a0244a0e7a),
263 pointer_default(unique),
264 local
266 interface IDebugApplication32 : IRemoteDebugApplication
268 HRESULT SetName(
269 [in] LPCOLESTR pstrName);
271 HRESULT StepOutComplete();
273 HRESULT DebugOutput(
274 [in] LPCOLESTR pstr);
276 HRESULT StartDebugSession();
278 HRESULT HandleBreakPoint(
279 [in] BREAKREASON br,
280 [out] BREAKRESUMEACTION *pbra);
282 HRESULT Close();
284 HRESULT GetBreakFlags(
285 [out] APPBREAKFLAGS *pabf,
286 [out] IRemoteDebugApplicationThread **pprdatSteppingThread);
288 HRESULT GetCurrentThread(
289 [out] IDebugApplicationThread **pat);
291 HRESULT CreateAsyncDebugOperation(
292 [in] IDebugSyncOperation *psdo,
293 [out] IDebugAsyncOperation **ppado);
295 HRESULT AddStackFrameSniffer(
296 [in] IDebugStackFrameSniffer *pdsfs,
297 [out] DWORD *pdwCookie);
299 HRESULT RemoveStackFrameSniffer(
300 [in] DWORD dwCookie);
302 HRESULT QueryCurrentThreadIsDebuggerThread();
304 HRESULT SynchronousCallInDebuggerThread(
305 [in] IDebugThreadCall32 *pptc,
306 [in] DWORD dwParam1,
307 [in] DWORD dwParam2,
308 [in] DWORD dwParam3);
310 HRESULT CreateApplicationNode(
311 [out] IDebugApplicationNode **ppdanNew);
313 HRESULT FireDebuggerEvent(
314 [in] REFGUID riid,
315 [in] IUnknown *punk);
317 HRESULT HandleRuntimeError(
318 [in] IActiveScriptErrorDebug *pErrorDebug,
319 [in] IActiveScriptSite *pScriptSite,
320 [out] BREAKRESUMEACTION *pbra,
321 [out] ERRORRESUMEACTION *perra,
322 [out] BOOL *pfCallOnScriptError);
324 BOOL FCanJitDebug();
326 BOOL FIsAutoJitDebugEnabled();
328 HRESULT AddGlobalExpressionContextProvider(
329 [in] IProvideExpressionContexts *pdsfs,
330 [out] DWORD *pdwCookie);
332 HRESULT RemoveGlobalExpressionContextProvider(
333 [in] DWORD dwCookie);
336 /************************************************************
337 * interface IDebugApplication64
340 object,
341 uuid(4dedc754-04c7-4f10-9e60-16a390fe6e62),
342 pointer_default(unique),
343 local
345 interface IDebugApplication64 : IRemoteDebugApplication
347 HRESULT SetName(
348 [in] LPCOLESTR pstrName);
350 HRESULT StepOutComplete();
352 HRESULT DebugOutput(
353 [in] LPCOLESTR pstr);
355 HRESULT StartDebugSession();
357 HRESULT HandleBreakPoint(
358 [in] BREAKREASON br,
359 [out] BREAKRESUMEACTION *pbra);
361 HRESULT Close();
363 HRESULT GetBreakFlags(
364 [out] APPBREAKFLAGS *pabf,
365 [out] IRemoteDebugApplicationThread **pprdatSteppingThread);
367 HRESULT GetCurrentThread(
368 [out] IDebugApplicationThread **pat);
370 HRESULT CreateAsyncDebugOperation(
371 [in] IDebugSyncOperation *psdo,
372 [out] IDebugAsyncOperation **ppado);
374 HRESULT AddStackFrameSniffer(
375 [in] IDebugStackFrameSniffer *pdsfs,
376 [out] DWORD *pdwCookie);
378 HRESULT RemoveStackFrameSniffer(
379 [in] DWORD dwCookie);
381 HRESULT QueryCurrentThreadIsDebuggerThread();
383 HRESULT SynchronousCallInDebuggerThread(
384 [in] IDebugThreadCall32 *pptc,
385 [in] DWORDLONG dwParam1,
386 [in] DWORDLONG dwParam2,
387 [in] DWORDLONG dwParam3);
389 HRESULT CreateApplicationNode(
390 [out] IDebugApplicationNode **ppdanNew);
392 HRESULT FireDebuggerEvent(
393 [in] REFGUID riid,
394 [in] IUnknown *punk);
396 HRESULT HandleRuntimeError(
397 [in] IActiveScriptErrorDebug *pErrorDebug,
398 [in] IActiveScriptSite *pScriptSite,
399 [out] BREAKRESUMEACTION *pbra,
400 [out] ERRORRESUMEACTION *perra,
401 [out] BOOL *pfCallOnScriptError);
403 BOOL FCanJitDebug();
405 BOOL FIsAutoJitDebugEnabled();
407 HRESULT AddGlobalExpressionContextProvider(
408 [in] IProvideExpressionContexts *pdsfs,
409 [out] DWORDLONG *pdwCookie);
411 HRESULT RemoveGlobalExpressionContextProvider(
412 [in] DWORDLONG dwCookie);
415 /************************************************************
416 * interface IActiveScriptSiteDebug32
419 object,
420 uuid(51973c11-cb0c-11d0-b5c9-00a0244a0e7a),
421 pointer_default(unique),
422 local
424 interface IActiveScriptSiteDebug32 : IUnknown
426 HRESULT GetDocumentContextFromPosition(
427 [in] DWORD dwSourceContext,
428 [in] ULONG uCharacterOffset,
429 [in] ULONG uNumChars,
430 [out] IDebugDocumentContext **ppsc);
432 HRESULT GetApplication(
433 [out] IDebugApplication32 **ppda);
435 HRESULT GetRootApplicationNode(
436 [out] IDebugApplicationNode **ppdanRoot);
438 HRESULT OnScriptErrorDebug(
439 [in] IActiveScriptErrorDebug *pErrorDebug,
440 [out] BOOL *pfEnterDebugger,
441 [out] BOOL *pfCallOnScriptErrorWhenContinuing);
444 /************************************************************
445 * interface IActiveScriptSiteDebug64
448 object,
449 uuid(d6b96b0a-7463-402c-92ac-89984226942f),
450 pointer_default(unique),
451 local
453 interface IActiveScriptSiteDebug64 : IUnknown
455 HRESULT GetDocumentContextFromPosition(
456 [in] DWORDLONG dwSourceContext,
457 [in] ULONG uCharacterOffset,
458 [in] ULONG uNumChars,
459 [out] IDebugDocumentContext **ppsc);
461 HRESULT GetApplication(
462 [out] IDebugApplication64 **ppda);
464 HRESULT GetRootApplicationNode(
465 [out] IDebugApplicationNode **ppdanRoot);
467 HRESULT OnScriptErrorDebug(
468 [in] IActiveScriptErrorDebug *pErrorDebug,
469 [out] BOOL *pfEnterDebugger,
470 [out] BOOL *pfCallOnScriptErrorWhenContinuing);
473 cpp_quote("#ifndef DISABLE_ACTIVDBG_INTERFACE_WRAPPERS")
474 cpp_quote("#ifdef _WIN64")
476 cpp_quote("#define IActiveScriptSiteDebug IActiveScriptSiteDebug64")
477 cpp_quote("#define IID_IActiveScriptSiteDebug IID_IActiveScriptSiteDebug64")
479 cpp_quote("#define IDebugApplication IDebugApplication64")
480 cpp_quote("#define IID_IDebugApplication IID_IDebugApplication64")
482 cpp_quote("#else")
484 cpp_quote("#define IActiveScriptSiteDebug IActiveScriptSiteDebug32")
485 cpp_quote("#define IID_IActiveScriptSiteDebug IID_IActiveScriptSiteDebug32")
487 cpp_quote("#define IDebugApplication IDebugApplication32")
488 cpp_quote("#define IID_IDebugApplication IID_IDebugApplication32")
490 cpp_quote("#endif")
491 cpp_quote("#endif")