ReactOS 0.4.16-dev-2332-g4cba65d
cordebug.c
Go to the documentation of this file.
1/*
2 *
3 * Copyright 2011 Alistair Leslie-Hughes
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 */
19
20#define COBJMACROS
21
22#include <stdarg.h>
23
24#include "windef.h"
25#include "winbase.h"
26
27#include "winuser.h"
28#include "winnls.h"
29#include "winreg.h"
30#include "ole2.h"
31#include "shellapi.h"
32#include "mscoree.h"
33#include "corhdr.h"
34#include "metahost.h"
35#include "cordebug.h"
36#include "wine/list.h"
37#include "mscoree_private.h"
38#include "wine/debug.h"
39
40
42
43typedef struct DebugProcess
44{
46
48
52
55
56static inline CorDebug *impl_from_ICorDebug( ICorDebug *iface )
57{
58 return CONTAINING_RECORD(iface, CorDebug, ICorDebug_iface);
59}
60
62{
63 return CONTAINING_RECORD(iface, CorDebug, ICorDebugProcessEnum_iface);
64}
65
67{
68 return CONTAINING_RECORD(iface, DebugProcess, ICorDebugProcess_iface);
69}
70
71/* ICorDebugProcess Interface */
73 REFIID riid, void **ppvObject)
74{
76
77 TRACE("%p %s %p\n", This, debugstr_guid(riid), ppvObject);
78
79 if ( IsEqualGUID( riid, &IID_ICorDebugProcess ) ||
80 IsEqualGUID( riid, &IID_ICorDebugController ) ||
82 {
83 *ppvObject = &This->ICorDebugProcess_iface;
84 }
85 else
86 {
87 FIXME("Unsupported interface %s\n", debugstr_guid(riid));
88 return E_NOINTERFACE;
89 }
90
91 ICorDebugProcess_AddRef(iface);
92
93 return S_OK;
94}
95
97{
100
101 TRACE("%p ref=%lu\n", This, ref);
102
103 return ref;
104}
105
107{
110
111 TRACE("%p ref=%lu\n", This, ref);
112
113 if (ref == 0)
114 {
115 if(This->handle)
116 CloseHandle(This->handle);
117
118 if(This->thread)
119 CloseHandle(This->thread);
120
121 if(This->cordebug)
122 ICorDebug_Release(&This->cordebug->ICorDebug_iface);
123
124 free(This);
125 }
126
127 return ref;
128}
129
131{
133 FIXME("stub %p\n", This);
134 return E_NOTIMPL;
135}
136
138{
140 TRACE("%p\n", This);
141
142 if(This->thread)
143 ResumeThread(This->thread);
144
145 return S_OK;
146}
147
149{
151 FIXME("stub %p\n", This);
152 return E_NOTIMPL;
153}
154
156 ICorDebugThread *pThread, BOOL *pbQueued)
157{
159 FIXME("stub %p\n", This);
160 return E_NOTIMPL;
161}
162
164 ICorDebugThreadEnum **ppThreads)
165{
167 FIXME("stub %p\n", This);
168 return E_NOTIMPL;
169}
170
172 CorDebugThreadState state, ICorDebugThread *pExceptThisThread)
173{
175 FIXME("stub %p\n", This);
176 return E_NOTIMPL;
177}
178
180{
182 FIXME("stub %p\n", This);
183 return E_NOTIMPL;
184}
185
187{
189 BOOL ret = TRUE;
190
191 TRACE("%p\n", This);
192
193 if(This->handle)
194 {
195 ret = TerminateProcess(This->handle, exitCode);
196 CloseHandle(This->handle);
197 This->handle = NULL;
198 }
199 return ret ? S_OK : E_FAIL;
200}
201
203 ULONG cSnapshots, ICorDebugEditAndContinueSnapshot * pSnapshots[],
204 ICorDebugErrorInfoEnum **pError)
205{
207 FIXME("stub %p\n", This);
208 return E_NOTIMPL;
209}
210
212 ULONG cSnapshots, ICorDebugEditAndContinueSnapshot * pSnapshots[],
213 ICorDebugErrorInfoEnum **pError)
214{
216 FIXME("stub %p\n", This);
217 return E_NOTIMPL;
218}
219
221{
223 TRACE("%p\n", This);
224
225 if(!pdwProcessId)
226 return E_INVALIDARG;
227
228 *pdwProcessId = This->dwProcessID;
229
230 return S_OK;
231}
232
234{
236 TRACE("%p\n", This);
237
238 if(!phProcessHandle)
239 return E_INVALIDARG;
240
241 *phProcessHandle = This->handle;
242
243 return S_OK;
244}
245
247 ICorDebugThread **ppThread)
248{
250 FIXME("stub %p\n", This);
251 return E_NOTIMPL;
252}
253
255 ICorDebugObjectEnum **ppObjects)
256{
258 FIXME("stub %p\n", This);
259 return E_NOTIMPL;
260}
261
263 CORDB_ADDRESS address, BOOL *pbTransitionStub)
264{
266 FIXME("stub %p\n", This);
267 return E_NOTIMPL;
268}
269
271 DWORD threadID, BOOL *pbSuspended)
272{
274 FIXME("stub %p\n", This);
275 return E_NOTIMPL;
276}
277
279 DWORD threadID, ULONG32 contextSize, BYTE context[])
280{
282 FIXME("stub %p\n", This);
283 return E_NOTIMPL;
284}
285
287 DWORD threadID, ULONG32 contextSize, BYTE context[])
288{
290 FIXME("stub %p\n", This);
291 return E_NOTIMPL;
292}
293
296 SIZE_T *read)
297{
299 FIXME("stub %p\n", This);
300 return E_NOTIMPL;
301}
302
305 SIZE_T *written)
306{
308 FIXME("stub %p\n", This);
309 return E_NOTIMPL;
310}
311
313 DWORD threadID)
314{
316 FIXME("stub %p\n", This);
317 return E_NOTIMPL;
318}
319
321 BOOL fOnOff)
322{
324 FIXME("stub %p\n", This);
325 return E_NOTIMPL;
326}
327
329 WCHAR *pLogSwitchName, LONG lLevel)
330{
332 FIXME("stub %p\n", This);
333 return E_NOTIMPL;
334}
335
337 ICorDebugAppDomainEnum **ppAppDomains)
338{
340 FIXME("stub %p\n", This);
341 return E_NOTIMPL;
342}
343
345 ICorDebugValue **ppObject)
346{
348 FIXME("stub %p\n", This);
349 return E_NOTIMPL;
350}
351
353 DWORD fiberCookie, ICorDebugThread **ppThread)
354{
356 FIXME("stub %p\n", This);
357 return E_NOTIMPL;
358}
359
361 DWORD *pThreadID)
362{
364 FIXME("stub %p\n", This);
365 return E_NOTIMPL;
366}
367
368
369/***************************************/
370static const ICorDebugProcessVtbl cordebugprocessVtbl = {
401};
402
403
404static HRESULT CorDebugProcess_Create(CorDebug *cordebug, IUnknown** ppUnk, LPPROCESS_INFORMATION lpProcessInformation)
405{
407
408 This = malloc(sizeof *This);
409 if ( !This )
410 return E_OUTOFMEMORY;
411
412 if(!DuplicateHandle(GetCurrentProcess(), lpProcessInformation->hProcess,
414 {
415 ERR("Failed to duplicate process handle\n");
416 free(This);
417 return E_FAIL;
418 }
419 if(!DuplicateHandle(GetCurrentProcess(), lpProcessInformation->hThread,
421 {
422 CloseHandle(This->handle);
423
424 ERR("Failed to duplicate thread handle\n");
425 free(This);
426 return E_FAIL;
427 }
428
429 This->ICorDebugProcess_iface.lpVtbl = &cordebugprocessVtbl;
430 This->ref = 1;
431 This->cordebug = cordebug;
432 This->dwProcessID = lpProcessInformation->dwProcessId;
433
434 if(This->cordebug)
435 ICorDebug_AddRef(&This->cordebug->ICorDebug_iface);
436
437 *ppUnk = (IUnknown*)&This->ICorDebugProcess_iface;
438
439 return S_OK;
440}
441
442/* ICorDebugProcessEnum Interface */
444{
446
447 TRACE("%p %s %p\n", This, debugstr_guid(riid), ppvObject);
448
449 if ( IsEqualGUID( riid, &IID_ICorDebugProcessEnum ) ||
450 IsEqualGUID( riid, &IID_ICorDebugEnum ) ||
452 {
453 *ppvObject = &This->ICorDebugProcessEnum_iface;
454 }
455 else
456 {
457 FIXME("Unsupported interface %s\n", debugstr_guid(riid));
458 return E_NOINTERFACE;
459 }
460
461 ICorDebugProcessEnum_AddRef(iface);
462
463 return S_OK;
464}
465
467{
469 TRACE("%p ref=%lu\n", This, This->ref);
470
471 return ICorDebug_AddRef(&This->ICorDebug_iface);
472}
473
475{
477 TRACE("%p ref=%lu\n", This, This->ref);
478
479 return ICorDebug_Release(&This->ICorDebug_iface);
480}
481
483{
485 FIXME("stub %p\n", This);
486 return E_NOTIMPL;
487}
488
490{
492 FIXME("stub %p\n", This);
493 return E_NOTIMPL;
494}
495
497{
499 FIXME("stub %p %p\n", This, ppEnum);
500 return E_NOTIMPL;
501}
502
504{
506 TRACE("stub %p %p\n", This, pcelt);
507
508 if(!pcelt)
509 return E_INVALIDARG;
510
511 *pcelt = list_count(&This->processes);
512
513 return S_OK;
514}
515
517 ICorDebugProcess * processes[], ULONG *pceltFetched)
518{
520 FIXME("stub %p %ld %p %p\n", This, celt, processes, pceltFetched);
521 return E_NOTIMPL;
522}
523
524static const struct ICorDebugProcessEnumVtbl processenum_vtbl =
525{
534};
535
536/*** IUnknown methods ***/
538{
540
541 TRACE("%p %s %p\n", This, debugstr_guid(riid), ppvObject);
542
543 if ( IsEqualGUID( riid, &IID_ICorDebug ) ||
545 {
546 *ppvObject = &This->ICorDebug_iface;
547 }
548 else
549 {
550 FIXME("Unsupported interface %s\n", debugstr_guid(riid));
551 return E_NOINTERFACE;
552 }
553
554 ICorDebug_AddRef( iface );
555
556 return S_OK;
557}
558
560{
563
564 TRACE("%p ref=%lu\n", This, ref);
565
566 return ref;
567}
568
570{
573
574 TRACE("%p ref=%lu\n", This, ref);
575
576 if (ref == 0)
577 {
578 if(!list_empty(&This->processes))
579 ERR("Processes haven't been removed Correctly\n");
580
581 if(This->runtimehost)
582 ICLRRuntimeHost_Release(This->runtimehost);
583
584 if(This->pCallback2)
585 ICorDebugManagedCallback2_Release(This->pCallback2);
586
587 if(This->pCallback)
588 ICorDebugManagedCallback_Release(This->pCallback);
589
590 free(This);
591 }
592
593 return ref;
594}
595
596/*** ICorDebug methods ***/
598{
600 FIXME("stub %p\n", This);
601 return S_OK;
602}
603
605{
606 struct CorProcess *cursor, *cursor2;
608 TRACE("stub %p\n", This);
609
610 LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, &This->processes, struct CorProcess, entry)
611 {
612 if(cursor->pProcess)
613 {
614 ICorDebugProcess_Terminate(cursor->pProcess, 0);
615 ICorDebugProcess_Release(cursor->pProcess);
616 }
617
618 list_remove(&cursor->entry);
619 free(cursor);
620 }
621
622 return S_OK;
623}
624
626{
628 HRESULT hr;
629 ICorDebugManagedCallback2 *pCallback2;
630
631 TRACE("%p (%p)\n", This, pCallback);
632
633 if(!pCallback)
634 return E_INVALIDARG;
635
636 hr = ICorDebugManagedCallback_QueryInterface(pCallback, &IID_ICorDebugManagedCallback2, (void**)&pCallback2);
637 if(hr == S_OK)
638 {
639 if(This->pCallback2)
640 ICorDebugManagedCallback2_Release(This->pCallback2);
641
642 if(This->pCallback)
643 ICorDebugManagedCallback_Release(This->pCallback);
644
645 This->pCallback = pCallback;
646 This->pCallback2 = pCallback2;
647
648 ICorDebugManagedCallback_AddRef(This->pCallback);
649 }
650 else
651 {
652 WARN("Debugging without interface ICorDebugManagedCallback2 is currently not supported.\n");
653 }
654
655 return hr;
656}
657
659{
661 FIXME("stub %p %p\n", This, pCallback);
662 return E_NOTIMPL;
663}
664
665static HRESULT WINAPI CorDebug_CreateProcess(ICorDebug *iface, LPCWSTR lpApplicationName,
666 LPWSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes,
667 LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles,
668 DWORD dwCreationFlags, PVOID lpEnvironment,LPCWSTR lpCurrentDirectory,
669 LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation,
670 CorDebugCreateProcessFlags debuggingFlags, ICorDebugProcess **ppProcess)
671{
673 ICorDebugProcess *pDebugProcess;
674 HRESULT hr;
675
676 TRACE("stub %p %s %s %p %p %d %ld %p %s %p %p %d %p\n", This, debugstr_w(lpApplicationName),
677 debugstr_w(lpCommandLine), lpProcessAttributes, lpThreadAttributes,
678 bInheritHandles, dwCreationFlags, lpEnvironment, debugstr_w(lpCurrentDirectory),
679 lpStartupInfo, lpProcessInformation, debuggingFlags, ppProcess);
680
681 if(CreateProcessW(lpApplicationName, lpCommandLine, lpProcessAttributes, lpThreadAttributes,
682 bInheritHandles, dwCreationFlags | CREATE_SUSPENDED, lpEnvironment, lpCurrentDirectory,
683 lpStartupInfo, lpProcessInformation))
684 {
685 hr = CorDebugProcess_Create(This, (IUnknown**)&pDebugProcess, lpProcessInformation);
686 if(hr == S_OK)
687 {
688 struct CorProcess *new_process = malloc(sizeof(CorProcess));
689
690 new_process->pProcess = pDebugProcess;
691 list_add_tail(&This->processes, &new_process->entry);
692
693 ICorDebugProcess_AddRef(pDebugProcess);
694 *ppProcess = pDebugProcess;
695
696 if(This->pCallback)
697 ICorDebugManagedCallback_CreateProcess(This->pCallback, pDebugProcess);
698 }
699 else
700 {
701 TerminateProcess(lpProcessInformation->hProcess, 0);
702 }
703 }
704 else
705 hr = E_FAIL;
706
707 return hr;
708}
709
711 ICorDebugProcess **ppProcess)
712{
714 FIXME("stub %p %ld %d %p\n", This, id, win32Attach, ppProcess);
715 return E_NOTIMPL;
716}
717
719{
721 TRACE("stub %p %p\n", This, ppProcess);
722
723 if(!ppProcess)
724 return E_INVALIDARG;
725
726 *ppProcess = &This->ICorDebugProcessEnum_iface;
727 ICorDebugProcessEnum_AddRef(*ppProcess);
728
729 return S_OK;
730}
731
733{
735 FIXME("stub %p %ld %p\n", This, dwProcessId, ppProcess);
736 return E_NOTIMPL;
737}
738
740 BOOL win32DebuggingEnabled)
741{
743 FIXME("stub %p %ld %d\n", This, dwProcessId, win32DebuggingEnabled);
744 return S_OK;
745}
746
747static const struct ICorDebugVtbl cordebug_vtbl =
748{
761};
762
764{
765 CorDebug *This;
766
767 This = malloc(sizeof *This);
768 if ( !This )
769 return E_OUTOFMEMORY;
770
771 This->ICorDebug_iface.lpVtbl = &cordebug_vtbl;
772 This->ICorDebugProcessEnum_iface.lpVtbl = &processenum_vtbl;
773 This->ref = 1;
774 This->pCallback = NULL;
775 This->pCallback2 = NULL;
776 This->runtimehost = runtimehost;
777
778 list_init(&This->processes);
779
780 if(This->runtimehost)
781 ICLRRuntimeHost_AddRef(This->runtimehost);
782
783 *ppUnk = (IUnknown*)&This->ICorDebug_iface;
784
785 return S_OK;
786}
#define read
Definition: acwin.h:96
static int state
Definition: maze.c:121
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
static void list_remove(struct list_entry *entry)
Definition: list.h:90
static int list_empty(struct list_entry *head)
Definition: list.h:58
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
Definition: list.h:83
static void list_init(struct list_entry *head)
Definition: list.h:51
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
unsigned int ULONG32
Definition: basetsd.h:117
const GUID IID_IUnknown
static HRESULT WINAPI cordebugprocess_EnumerateObjects(ICorDebugProcess *iface, ICorDebugObjectEnum **ppObjects)
Definition: cordebug.c:254
static HRESULT WINAPI cordebugprocess_Stop(ICorDebugProcess *iface, DWORD dwTimeoutIgnored)
Definition: cordebug.c:130
static HRESULT WINAPI cordebugprocess_ClearCurrentException(ICorDebugProcess *iface, DWORD threadID)
Definition: cordebug.c:312
static HRESULT CorDebugProcess_Create(CorDebug *cordebug, IUnknown **ppUnk, LPPROCESS_INFORMATION lpProcessInformation)
Definition: cordebug.c:404
static CorDebug * impl_from_ICorDebugProcessEnum(ICorDebugProcessEnum *iface)
Definition: cordebug.c:61
static HRESULT WINAPI cordebugprocess_IsTransitionStub(ICorDebugProcess *iface, CORDB_ADDRESS address, BOOL *pbTransitionStub)
Definition: cordebug.c:262
static HRESULT WINAPI cordebugprocess_Continue(ICorDebugProcess *iface, BOOL fIsOutOfBand)
Definition: cordebug.c:137
static HRESULT WINAPI cordebugprocess_EnableLogMessages(ICorDebugProcess *iface, BOOL fOnOff)
Definition: cordebug.c:320
static HRESULT WINAPI cordebugprocess_SetThreadContext(ICorDebugProcess *iface, DWORD threadID, ULONG32 contextSize, BYTE context[])
Definition: cordebug.c:286
static HRESULT WINAPI cordebugprocess_ThreadForFiberCookie(ICorDebugProcess *iface, DWORD fiberCookie, ICorDebugThread **ppThread)
Definition: cordebug.c:352
static HRESULT WINAPI cordebugprocess_EnumerateThreads(ICorDebugProcess *iface, ICorDebugThreadEnum **ppThreads)
Definition: cordebug.c:163
static CorDebug * impl_from_ICorDebug(ICorDebug *iface)
Definition: cordebug.c:56
static HRESULT WINAPI CorDebug_CreateProcess(ICorDebug *iface, LPCWSTR lpApplicationName, LPWSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, PVOID lpEnvironment, LPCWSTR lpCurrentDirectory, LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation, CorDebugCreateProcessFlags debuggingFlags, ICorDebugProcess **ppProcess)
Definition: cordebug.c:665
static HRESULT WINAPI CorDebug_SetManagedHandler(ICorDebug *iface, ICorDebugManagedCallback *pCallback)
Definition: cordebug.c:625
static HRESULT WINAPI cordebugprocess_CanCommitChanges(ICorDebugProcess *iface, ULONG cSnapshots, ICorDebugEditAndContinueSnapshot *pSnapshots[], ICorDebugErrorInfoEnum **pError)
Definition: cordebug.c:202
static HRESULT WINAPI cordebugprocess_QueryInterface(ICorDebugProcess *iface, REFIID riid, void **ppvObject)
Definition: cordebug.c:72
static HRESULT WINAPI process_enum_GetCount(ICorDebugProcessEnum *iface, ULONG *pcelt)
Definition: cordebug.c:503
static HRESULT WINAPI cordebugprocess_IsRunning(ICorDebugProcess *iface, BOOL *pbRunning)
Definition: cordebug.c:148
static HRESULT WINAPI cordebugprocess_HasQueuedCallbacks(ICorDebugProcess *iface, ICorDebugThread *pThread, BOOL *pbQueued)
Definition: cordebug.c:155
static ULONG WINAPI cordebugprocess_AddRef(ICorDebugProcess *iface)
Definition: cordebug.c:96
static HRESULT WINAPI cordebugprocess_GetHelperThreadID(ICorDebugProcess *iface, DWORD *pThreadID)
Definition: cordebug.c:360
static HRESULT WINAPI cordebugprocess_SetAllThreadsDebugState(ICorDebugProcess *iface, CorDebugThreadState state, ICorDebugThread *pExceptThisThread)
Definition: cordebug.c:171
static const struct ICorDebugProcessEnumVtbl processenum_vtbl
Definition: cordebug.c:524
static HRESULT WINAPI CorDebug_Initialize(ICorDebug *iface)
Definition: cordebug.c:597
static HRESULT WINAPI cordebugprocess_Detach(ICorDebugProcess *iface)
Definition: cordebug.c:179
static HRESULT WINAPI process_enum_Clone(ICorDebugProcessEnum *iface, ICorDebugEnum **ppEnum)
Definition: cordebug.c:496
static HRESULT WINAPI CorDebug_DebugActiveProcess(ICorDebug *iface, DWORD id, BOOL win32Attach, ICorDebugProcess **ppProcess)
Definition: cordebug.c:710
static HRESULT WINAPI CorDebug_CanLaunchOrAttach(ICorDebug *iface, DWORD dwProcessId, BOOL win32DebuggingEnabled)
Definition: cordebug.c:739
static ULONG WINAPI CorDebug_AddRef(ICorDebug *iface)
Definition: cordebug.c:559
static HRESULT WINAPI cordebugprocess_ModifyLogSwitch(ICorDebugProcess *iface, WCHAR *pLogSwitchName, LONG lLevel)
Definition: cordebug.c:328
static HRESULT WINAPI cordebugprocess_GetThread(ICorDebugProcess *iface, DWORD dwThreadId, ICorDebugThread **ppThread)
Definition: cordebug.c:246
static HRESULT WINAPI CorDebug_SetUnmanagedHandler(ICorDebug *iface, ICorDebugUnmanagedCallback *pCallback)
Definition: cordebug.c:658
static const ICorDebugProcessVtbl cordebugprocessVtbl
Definition: cordebug.c:370
static HRESULT WINAPI cordebugprocess_GetID(ICorDebugProcess *iface, DWORD *pdwProcessId)
Definition: cordebug.c:220
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:66
static HRESULT WINAPI CorDebug_GetProcess(ICorDebug *iface, DWORD dwProcessId, ICorDebugProcess **ppProcess)
Definition: cordebug.c:732
static HRESULT WINAPI cordebugprocess_GetThreadContext(ICorDebugProcess *iface, DWORD threadID, ULONG32 contextSize, BYTE context[])
Definition: cordebug.c:278
static HRESULT WINAPI cordebugprocess_WriteMemory(ICorDebugProcess *iface, CORDB_ADDRESS address, DWORD size, BYTE buffer[], SIZE_T *written)
Definition: cordebug.c:303
static HRESULT WINAPI cordebugprocess_IsOSSuspended(ICorDebugProcess *iface, DWORD threadID, BOOL *pbSuspended)
Definition: cordebug.c:270
static HRESULT WINAPI process_enum_QueryInterface(ICorDebugProcessEnum *iface, REFIID riid, void **ppvObject)
Definition: cordebug.c:443
static HRESULT WINAPI CorDebug_EnumerateProcesses(ICorDebug *iface, ICorDebugProcessEnum **ppProcess)
Definition: cordebug.c:718
static ULONG WINAPI process_enum_AddRef(ICorDebugProcessEnum *iface)
Definition: cordebug.c:466
static HRESULT WINAPI process_enum_Reset(ICorDebugProcessEnum *iface)
Definition: cordebug.c:489
static HRESULT WINAPI process_enum_Skip(ICorDebugProcessEnum *iface, ULONG celt)
Definition: cordebug.c:482
static HRESULT WINAPI process_enum_Next(ICorDebugProcessEnum *iface, ULONG celt, ICorDebugProcess *processes[], ULONG *pceltFetched)
Definition: cordebug.c:516
static HRESULT WINAPI cordebugprocess_Terminate(ICorDebugProcess *iface, UINT exitCode)
Definition: cordebug.c:186
static ULONG WINAPI process_enum_Release(ICorDebugProcessEnum *iface)
Definition: cordebug.c:474
static HRESULT WINAPI CorDebug_QueryInterface(ICorDebug *iface, REFIID riid, void **ppvObject)
Definition: cordebug.c:537
static HRESULT WINAPI cordebugprocess_ReadMemory(ICorDebugProcess *iface, CORDB_ADDRESS address, DWORD size, BYTE buffer[], SIZE_T *read)
Definition: cordebug.c:294
static HRESULT WINAPI cordebugprocess_GetObject(ICorDebugProcess *iface, ICorDebugValue **ppObject)
Definition: cordebug.c:344
static ULONG WINAPI cordebugprocess_Release(ICorDebugProcess *iface)
Definition: cordebug.c:106
HRESULT CorDebug_Create(ICLRRuntimeHost *runtimehost, IUnknown **ppUnk)
Definition: cordebug.c:763
static ULONG WINAPI CorDebug_Release(ICorDebug *iface)
Definition: cordebug.c:569
static HRESULT WINAPI CorDebug_Terminate(ICorDebug *iface)
Definition: cordebug.c:604
static HRESULT WINAPI cordebugprocess_EnumerateAppDomains(ICorDebugProcess *iface, ICorDebugAppDomainEnum **ppAppDomains)
Definition: cordebug.c:336
static HRESULT WINAPI cordebugprocess_CommitChanges(ICorDebugProcess *iface, ULONG cSnapshots, ICorDebugEditAndContinueSnapshot *pSnapshots[], ICorDebugErrorInfoEnum **pError)
Definition: cordebug.c:211
static const struct ICorDebugVtbl cordebug_vtbl
Definition: cordebug.c:747
static HRESULT WINAPI cordebugprocess_GetHandle(ICorDebugProcess *iface, HPROCESS *phProcessHandle)
Definition: cordebug.c:233
ULONG64 CORDB_ADDRESS
Definition: cordebug.idl:90
CorDebugCreateProcessFlags
Definition: cordebug.idl:136
SIZE_T LPSTARTUPINFOW
Definition: cordebug.idl:85
SIZE_T LPPROCESS_INFORMATION
Definition: cordebug.idl:86
CorDebugThreadState
Definition: cordebug.idl:130
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define CloseHandle
Definition: compat.h:739
#define GetCurrentProcess()
Definition: compat.h:759
BOOL WINAPI DuplicateHandle(IN HANDLE hSourceProcessHandle, IN HANDLE hSourceHandle, IN HANDLE hTargetProcessHandle, OUT LPHANDLE lpTargetHandle, IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwOptions)
Definition: handle.c:149
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessW(LPCWSTR lpApplicationName, LPWSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCWSTR lpCurrentDirectory, LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
Definition: proc.c:4442
BOOL WINAPI TerminateProcess(IN HANDLE hProcess, IN UINT uExitCode)
Definition: proc.c:1376
DWORD WINAPI ResumeThread(IN HANDLE hThread)
Definition: thread.c:567
return ret
Definition: mutex.c:146
DWORD dwThreadId
Definition: fdebug.c:31
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
FxPnpStateCallbackInfo * pCallback
GLuint address
Definition: glext.h:9393
GLuint buffer
Definition: glext.h:5915
GLsizeiptr size
Definition: glext.h:5919
const char cursor[]
Definition: icontest.c:13
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
uint32_t entry
Definition: isohybrid.c:63
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_w
Definition: kernel32.h:32
unsigned int UINT
Definition: ndis.h:50
long LONG
Definition: pedump.c:60
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
_In_ DWORD dwProcessId
Definition: shlwapi.h:193
__WINE_SERVER_LIST_INLINE unsigned int list_count(const struct list *list)
Definition: list.h:155
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
struct list entry
ICorDebugProcess * pProcess
DWORD dwProcessID
Definition: cordebug.c:49
ICorDebugProcess ICorDebugProcess_iface
Definition: cordebug.c:45
CorDebug * cordebug
Definition: cordebug.c:47
HANDLE handle
Definition: cordebug.c:50
HANDLE thread
Definition: cordebug.c:51
LONG ref
Definition: cordebug.c:53
Definition: http.c:7252
Definition: send.c:48
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
#define CREATE_SUSPENDED
Definition: winbase.h:182
#define WINAPI
Definition: msvc.h:6
#define E_NOINTERFACE
Definition: winerror.h:3479
#define DUPLICATE_SAME_ACCESS
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
unsigned char BYTE
Definition: xxhash.c:193