ReactOS  0.4.14-dev-50-g13bb5e2
cordebug.c File Reference
#include "mscoree_private.h"
Include dependency graph for cordebug.c:

Go to the source code of this file.

Classes

struct  DebugProcess
 

Typedefs

typedef struct DebugProcess DebugProcess
 

Functions

static CorDebugimpl_from_ICorDebug (ICorDebug *iface)
 
static CorDebugimpl_from_ICorDebugProcessEnum (ICorDebugProcessEnum *iface)
 
static DebugProcessimpl_from_ICorDebugProcess (ICorDebugProcess *iface)
 
static HRESULT WINAPI cordebugprocess_QueryInterface (ICorDebugProcess *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI cordebugprocess_AddRef (ICorDebugProcess *iface)
 
static ULONG WINAPI cordebugprocess_Release (ICorDebugProcess *iface)
 
static HRESULT WINAPI cordebugprocess_Stop (ICorDebugProcess *iface, DWORD dwTimeoutIgnored)
 
static HRESULT WINAPI cordebugprocess_Continue (ICorDebugProcess *iface, BOOL fIsOutOfBand)
 
static HRESULT WINAPI cordebugprocess_IsRunning (ICorDebugProcess *iface, BOOL *pbRunning)
 
static HRESULT WINAPI cordebugprocess_HasQueuedCallbacks (ICorDebugProcess *iface, ICorDebugThread *pThread, BOOL *pbQueued)
 
static HRESULT WINAPI cordebugprocess_EnumerateThreads (ICorDebugProcess *iface, ICorDebugThreadEnum **ppThreads)
 
static HRESULT WINAPI cordebugprocess_SetAllThreadsDebugState (ICorDebugProcess *iface, CorDebugThreadState state, ICorDebugThread *pExceptThisThread)
 
static HRESULT WINAPI cordebugprocess_Detach (ICorDebugProcess *iface)
 
static HRESULT WINAPI cordebugprocess_Terminate (ICorDebugProcess *iface, UINT exitCode)
 
static HRESULT WINAPI cordebugprocess_CanCommitChanges (ICorDebugProcess *iface, ULONG cSnapshots, ICorDebugEditAndContinueSnapshot *pSnapshots[], ICorDebugErrorInfoEnum **pError)
 
static HRESULT WINAPI cordebugprocess_CommitChanges (ICorDebugProcess *iface, ULONG cSnapshots, ICorDebugEditAndContinueSnapshot *pSnapshots[], ICorDebugErrorInfoEnum **pError)
 
static HRESULT WINAPI cordebugprocess_GetID (ICorDebugProcess *iface, DWORD *pdwProcessId)
 
static HRESULT WINAPI cordebugprocess_GetHandle (ICorDebugProcess *iface, HPROCESS *phProcessHandle)
 
static HRESULT WINAPI cordebugprocess_GetThread (ICorDebugProcess *iface, DWORD dwThreadId, ICorDebugThread **ppThread)
 
static HRESULT WINAPI cordebugprocess_EnumerateObjects (ICorDebugProcess *iface, ICorDebugObjectEnum **ppObjects)
 
static HRESULT WINAPI cordebugprocess_IsTransitionStub (ICorDebugProcess *iface, CORDB_ADDRESS address, BOOL *pbTransitionStub)
 
static HRESULT WINAPI cordebugprocess_IsOSSuspended (ICorDebugProcess *iface, DWORD threadID, BOOL *pbSuspended)
 
static HRESULT WINAPI cordebugprocess_GetThreadContext (ICorDebugProcess *iface, DWORD threadID, ULONG32 contextSize, BYTE context[])
 
static HRESULT WINAPI cordebugprocess_SetThreadContext (ICorDebugProcess *iface, DWORD threadID, ULONG32 contextSize, BYTE context[])
 
static HRESULT WINAPI cordebugprocess_ReadMemory (ICorDebugProcess *iface, CORDB_ADDRESS address, DWORD size, BYTE buffer[], SIZE_T *read)
 
static HRESULT WINAPI cordebugprocess_WriteMemory (ICorDebugProcess *iface, CORDB_ADDRESS address, DWORD size, BYTE buffer[], SIZE_T *written)
 
static HRESULT WINAPI cordebugprocess_ClearCurrentException (ICorDebugProcess *iface, DWORD threadID)
 
static HRESULT WINAPI cordebugprocess_EnableLogMessages (ICorDebugProcess *iface, BOOL fOnOff)
 
static HRESULT WINAPI cordebugprocess_ModifyLogSwitch (ICorDebugProcess *iface, WCHAR *pLogSwitchName, LONG lLevel)
 
static HRESULT WINAPI cordebugprocess_EnumerateAppDomains (ICorDebugProcess *iface, ICorDebugAppDomainEnum **ppAppDomains)
 
static HRESULT WINAPI cordebugprocess_GetObject (ICorDebugProcess *iface, ICorDebugValue **ppObject)
 
static HRESULT WINAPI cordebugprocess_ThreadForFiberCookie (ICorDebugProcess *iface, DWORD fiberCookie, ICorDebugThread **ppThread)
 
static HRESULT WINAPI cordebugprocess_GetHelperThreadID (ICorDebugProcess *iface, DWORD *pThreadID)
 
static HRESULT CorDebugProcess_Create (CorDebug *cordebug, IUnknown **ppUnk, LPPROCESS_INFORMATION lpProcessInformation)
 
static HRESULT WINAPI process_enum_QueryInterface (ICorDebugProcessEnum *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI process_enum_AddRef (ICorDebugProcessEnum *iface)
 
static ULONG WINAPI process_enum_Release (ICorDebugProcessEnum *iface)
 
static HRESULT WINAPI process_enum_Skip (ICorDebugProcessEnum *iface, ULONG celt)
 
static HRESULT WINAPI process_enum_Reset (ICorDebugProcessEnum *iface)
 
static HRESULT WINAPI process_enum_Clone (ICorDebugProcessEnum *iface, ICorDebugEnum **ppEnum)
 
static HRESULT WINAPI process_enum_GetCount (ICorDebugProcessEnum *iface, ULONG *pcelt)
 
static HRESULT WINAPI process_enum_Next (ICorDebugProcessEnum *iface, ULONG celt, ICorDebugProcess *processes[], ULONG *pceltFetched)
 
static HRESULT WINAPI CorDebug_QueryInterface (ICorDebug *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI CorDebug_AddRef (ICorDebug *iface)
 
static ULONG WINAPI CorDebug_Release (ICorDebug *iface)
 
static HRESULT WINAPI CorDebug_Initialize (ICorDebug *iface)
 
static HRESULT WINAPI CorDebug_Terminate (ICorDebug *iface)
 
static HRESULT WINAPI CorDebug_SetManagedHandler (ICorDebug *iface, ICorDebugManagedCallback *pCallback)
 
static HRESULT WINAPI CorDebug_SetUnmanagedHandler (ICorDebug *iface, ICorDebugUnmanagedCallback *pCallback)
 
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)
 
static HRESULT WINAPI CorDebug_DebugActiveProcess (ICorDebug *iface, DWORD id, BOOL win32Attach, ICorDebugProcess **ppProcess)
 
static HRESULT WINAPI CorDebug_EnumerateProcesses (ICorDebug *iface, ICorDebugProcessEnum **ppProcess)
 
static HRESULT WINAPI CorDebug_GetProcess (ICorDebug *iface, DWORD dwProcessId, ICorDebugProcess **ppProcess)
 
static HRESULT WINAPI CorDebug_CanLaunchOrAttach (ICorDebug *iface, DWORD dwProcessId, BOOL win32DebuggingEnabled)
 
HRESULT CorDebug_Create (ICLRRuntimeHost *runtimehost, IUnknown **ppUnk)
 

Variables

static const ICorDebugProcessVtbl cordebugprocessVtbl
 
static const struct ICorDebugProcessEnumVtbl processenum_vtbl
 
static const struct ICorDebugVtbl cordebug_vtbl
 

Typedef Documentation

◆ DebugProcess

Function Documentation

◆ CorDebug_AddRef()

static ULONG WINAPI CorDebug_AddRef ( ICorDebug iface)
static

Definition at line 538 of file cordebug.c.

539 {
540  CorDebug *This = impl_from_ICorDebug( iface );
542 
543  TRACE("%p ref=%u\n", This, ref);
544 
545  return ref;
546 }
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
static CorDebug * impl_from_ICorDebug(ICorDebug *iface)
Definition: cordebug.c:35
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

◆ CorDebug_CanLaunchOrAttach()

static HRESULT WINAPI CorDebug_CanLaunchOrAttach ( ICorDebug iface,
DWORD  dwProcessId,
BOOL  win32DebuggingEnabled 
)
static

Definition at line 718 of file cordebug.c.

720 {
721  CorDebug *This = impl_from_ICorDebug( iface );
722  FIXME("stub %p %d %d\n", This, dwProcessId, win32DebuggingEnabled);
723  return S_OK;
724 }
#define FIXME(fmt,...)
Definition: debug.h:110
static CorDebug * impl_from_ICorDebug(ICorDebug *iface)
Definition: cordebug.c:35
#define S_OK
Definition: intsafe.h:59

◆ CorDebug_Create()

HRESULT CorDebug_Create ( ICLRRuntimeHost runtimehost,
IUnknown **  ppUnk 
)

Definition at line 742 of file cordebug.c.

743 {
744  CorDebug *This;
745 
746  This = HeapAlloc( GetProcessHeap(), 0, sizeof *This );
747  if ( !This )
748  return E_OUTOFMEMORY;
749 
750  This->ICorDebug_iface.lpVtbl = &cordebug_vtbl;
751  This->ICorDebugProcessEnum_iface.lpVtbl = &processenum_vtbl;
752  This->ref = 1;
753  This->pCallback = NULL;
754  This->pCallback2 = NULL;
755  This->runtimehost = runtimehost;
756 
757  list_init(&This->processes);
758 
759  if(This->runtimehost)
760  ICLRRuntimeHost_AddRef(This->runtimehost);
761 
762  *ppUnk = (IUnknown*)&This->ICorDebug_iface;
763 
764  return S_OK;
765 }
static const struct ICorDebugVtbl cordebug_vtbl
Definition: cordebug.c:726
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
smooth NULL
Definition: ftsmooth.c:416
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static const struct ICorDebugProcessEnumVtbl processenum_vtbl
Definition: cordebug.c:503
#define S_OK
Definition: intsafe.h:59
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149

Referenced by RuntimeHost_GetInterface().

◆ CorDebug_CreateProcess()

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 
)
static

Definition at line 644 of file cordebug.c.

650 {
651  CorDebug *This = impl_from_ICorDebug( iface );
652  ICorDebugProcess *pDebugProcess;
653  HRESULT hr;
654 
655  TRACE("stub %p %s %s %p %p %d %d %p %s %p %p %d %p\n", This, debugstr_w(lpApplicationName),
656  debugstr_w(lpCommandLine), lpProcessAttributes, lpThreadAttributes,
657  bInheritHandles, dwCreationFlags, lpEnvironment, debugstr_w(lpCurrentDirectory),
658  lpStartupInfo, lpProcessInformation, debuggingFlags, ppProcess);
659 
660  if(CreateProcessW(lpApplicationName, lpCommandLine, lpProcessAttributes, lpThreadAttributes,
661  bInheritHandles, dwCreationFlags | CREATE_SUSPENDED, lpEnvironment, lpCurrentDirectory,
662  lpStartupInfo, lpProcessInformation))
663  {
664  hr = CorDebugProcess_Create(This, (IUnknown**)&pDebugProcess, lpProcessInformation);
665  if(hr == S_OK)
666  {
667  struct CorProcess *new_process = HeapAlloc( GetProcessHeap(), 0, sizeof(CorProcess) );
668 
669  new_process->pProcess = pDebugProcess;
670  list_add_tail(&This->processes, &new_process->entry);
671 
672  ICorDebugProcess_AddRef(pDebugProcess);
673  *ppProcess = pDebugProcess;
674 
675  if(This->pCallback)
676  ICorDebugManagedCallback_CreateProcess(This->pCallback, pDebugProcess);
677  }
678  else
679  {
680  TerminateProcess(lpProcessInformation->hProcess, 0);
681  }
682  }
683  else
684  hr = E_FAIL;
685 
686  return hr;
687 }
static HRESULT CorDebugProcess_Create(CorDebug *cordebug, IUnknown **ppUnk, LPPROCESS_INFORMATION lpProcessInformation)
Definition: cordebug.c:383
HRESULT hr
Definition: shlfolder.c:183
#define E_FAIL
Definition: ddrawi.h:102
ICorDebugProcess * pProcess
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
Definition: list.h:102
#define CREATE_SUSPENDED
Definition: winbase.h:178
#define debugstr_w
Definition: kernel32.h:32
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:4593
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG HRESULT
Definition: typedefs.h:77
static CorDebug * impl_from_ICorDebug(ICorDebug *iface)
Definition: cordebug.c:35
struct list entry
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI TerminateProcess(IN HANDLE hProcess, IN UINT uExitCode)
Definition: proc.c:1532

◆ CorDebug_DebugActiveProcess()

static HRESULT WINAPI CorDebug_DebugActiveProcess ( ICorDebug iface,
DWORD  id,
BOOL  win32Attach,
ICorDebugProcess **  ppProcess 
)
static

Definition at line 689 of file cordebug.c.

691 {
692  CorDebug *This = impl_from_ICorDebug( iface );
693  FIXME("stub %p %d %d %p\n", This, id, win32Attach, ppProcess);
694  return E_NOTIMPL;
695 }
#define FIXME(fmt,...)
Definition: debug.h:110
static CorDebug * impl_from_ICorDebug(ICorDebug *iface)
Definition: cordebug.c:35
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ CorDebug_EnumerateProcesses()

static HRESULT WINAPI CorDebug_EnumerateProcesses ( ICorDebug iface,
ICorDebugProcessEnum **  ppProcess 
)
static

Definition at line 697 of file cordebug.c.

698 {
699  CorDebug *This = impl_from_ICorDebug( iface );
700  TRACE("stub %p %p\n", This, ppProcess);
701 
702  if(!ppProcess)
703  return E_INVALIDARG;
704 
705  *ppProcess = &This->ICorDebugProcessEnum_iface;
706  ICorDebugProcessEnum_AddRef(*ppProcess);
707 
708  return S_OK;
709 }
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
static CorDebug * impl_from_ICorDebug(ICorDebug *iface)
Definition: cordebug.c:35
#define S_OK
Definition: intsafe.h:59

◆ CorDebug_GetProcess()

static HRESULT WINAPI CorDebug_GetProcess ( ICorDebug iface,
DWORD  dwProcessId,
ICorDebugProcess **  ppProcess 
)
static

Definition at line 711 of file cordebug.c.

712 {
713  CorDebug *This = impl_from_ICorDebug( iface );
714  FIXME("stub %p %d %p\n", This, dwProcessId, ppProcess);
715  return E_NOTIMPL;
716 }
#define FIXME(fmt,...)
Definition: debug.h:110
static CorDebug * impl_from_ICorDebug(ICorDebug *iface)
Definition: cordebug.c:35
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ CorDebug_Initialize()

static HRESULT WINAPI CorDebug_Initialize ( ICorDebug iface)
static

Definition at line 576 of file cordebug.c.

577 {
578  CorDebug *This = impl_from_ICorDebug( iface );
579  FIXME("stub %p\n", This);
580  return S_OK;
581 }
#define FIXME(fmt,...)
Definition: debug.h:110
static CorDebug * impl_from_ICorDebug(ICorDebug *iface)
Definition: cordebug.c:35
#define S_OK
Definition: intsafe.h:59

◆ CorDebug_QueryInterface()

static HRESULT WINAPI CorDebug_QueryInterface ( ICorDebug iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 516 of file cordebug.c.

517 {
518  CorDebug *This = impl_from_ICorDebug( iface );
519 
520  TRACE("%p %s %p\n", This, debugstr_guid(riid), ppvObject);
521 
522  if ( IsEqualGUID( riid, &IID_ICorDebug ) ||
524  {
525  *ppvObject = &This->ICorDebug_iface;
526  }
527  else
528  {
529  FIXME("Unsupported interface %s\n", debugstr_guid(riid));
530  return E_NOINTERFACE;
531  }
532 
533  ICorDebug_AddRef( iface );
534 
535  return S_OK;
536 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
static CorDebug * impl_from_ICorDebug(ICorDebug *iface)
Definition: cordebug.c:35
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021

◆ CorDebug_Release()

static ULONG WINAPI CorDebug_Release ( ICorDebug iface)
static

Definition at line 548 of file cordebug.c.

549 {
550  CorDebug *This = impl_from_ICorDebug( iface );
552 
553  TRACE("%p ref=%u\n", This, ref);
554 
555  if (ref == 0)
556  {
557  if(!list_empty(&This->processes))
558  ERR("Processes haven't been removed Correctly\n");
559 
560  if(This->runtimehost)
561  ICLRRuntimeHost_Release(This->runtimehost);
562 
563  if(This->pCallback)
564  ICorDebugManagedCallback2_Release(This->pCallback2);
565 
566  if(This->pCallback)
567  ICorDebugManagedCallback_Release(This->pCallback);
568 
570  }
571 
572  return ref;
573 }
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
static CorDebug * impl_from_ICorDebug(ICorDebug *iface)
Definition: cordebug.c:35
#define InterlockedDecrement
Definition: armddk.h:52
#define ERR(fmt,...)
Definition: debug.h:109
__WINE_SERVER_LIST_INLINE int list_empty(const struct list *list)
Definition: list.h:143
unsigned int ULONG
Definition: retypes.h:1
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ CorDebug_SetManagedHandler()

static HRESULT WINAPI CorDebug_SetManagedHandler ( ICorDebug iface,
ICorDebugManagedCallback pCallback 
)
static

Definition at line 604 of file cordebug.c.

605 {
606  CorDebug *This = impl_from_ICorDebug( iface );
607  HRESULT hr;
608  ICorDebugManagedCallback2 *pCallback2;
609 
610  TRACE("%p (%p)\n", This, pCallback);
611 
612  if(!pCallback)
613  return E_INVALIDARG;
614 
615  hr = ICorDebugManagedCallback_QueryInterface(pCallback, &IID_ICorDebugManagedCallback2, (void**)&pCallback2);
616  if(hr == S_OK)
617  {
618  if(This->pCallback2)
619  ICorDebugManagedCallback2_Release(This->pCallback2);
620 
621  if(This->pCallback)
622  ICorDebugManagedCallback_Release(This->pCallback);
623 
624  This->pCallback = pCallback;
625  This->pCallback2 = pCallback2;
626 
627  ICorDebugManagedCallback_AddRef(This->pCallback);
628  }
629  else
630  {
631  WARN("Debugging without interface ICorDebugManagedCallback2 is currently not supported.\n");
632  }
633 
634  return hr;
635 }
HRESULT hr
Definition: shlfolder.c:183
#define WARN(fmt,...)
Definition: debug.h:111
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static CorDebug * impl_from_ICorDebug(ICorDebug *iface)
Definition: cordebug.c:35
#define S_OK
Definition: intsafe.h:59

◆ CorDebug_SetUnmanagedHandler()

static HRESULT WINAPI CorDebug_SetUnmanagedHandler ( ICorDebug iface,
ICorDebugUnmanagedCallback pCallback 
)
static

Definition at line 637 of file cordebug.c.

638 {
639  CorDebug *This = impl_from_ICorDebug( iface );
640  FIXME("stub %p %p\n", This, pCallback);
641  return E_NOTIMPL;
642 }
#define FIXME(fmt,...)
Definition: debug.h:110
static CorDebug * impl_from_ICorDebug(ICorDebug *iface)
Definition: cordebug.c:35
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ CorDebug_Terminate()

static HRESULT WINAPI CorDebug_Terminate ( ICorDebug iface)
static

Definition at line 583 of file cordebug.c.

584 {
585  struct CorProcess *cursor, *cursor2;
586  CorDebug *This = impl_from_ICorDebug( iface );
587  TRACE("stub %p\n", This);
588 
589  LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, &This->processes, struct CorProcess, entry)
590  {
591  if(cursor->pProcess)
592  {
593  ICorDebugProcess_Terminate(cursor->pProcess, 0);
594  ICorDebugProcess_Release(cursor->pProcess);
595  }
596 
597  list_remove(&cursor->entry);
599  }
600 
601  return S_OK;
602 }
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
static CorDebug * impl_from_ICorDebug(ICorDebug *iface)
Definition: cordebug.c:35
uint32_t entry
Definition: isohybrid.c:63
#define S_OK
Definition: intsafe.h:59
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
const char cursor[]
Definition: icontest.c:13
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ cordebugprocess_AddRef()

static ULONG WINAPI cordebugprocess_AddRef ( ICorDebugProcess iface)
static

Definition at line 75 of file cordebug.c.

76 {
79 
80  TRACE("%p ref=%u\n", This, ref);
81 
82  return ref;
83 }
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:45

◆ cordebugprocess_CanCommitChanges()

static HRESULT WINAPI cordebugprocess_CanCommitChanges ( ICorDebugProcess iface,
ULONG  cSnapshots,
ICorDebugEditAndContinueSnapshot pSnapshots[],
ICorDebugErrorInfoEnum **  pError 
)
static

Definition at line 181 of file cordebug.c.

184 {
186  FIXME("stub %p\n", This);
187  return E_NOTIMPL;
188 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:45

◆ cordebugprocess_ClearCurrentException()

static HRESULT WINAPI cordebugprocess_ClearCurrentException ( ICorDebugProcess iface,
DWORD  threadID 
)
static

Definition at line 291 of file cordebug.c.

293 {
295  FIXME("stub %p\n", This);
296  return E_NOTIMPL;
297 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:45

◆ cordebugprocess_CommitChanges()

static HRESULT WINAPI cordebugprocess_CommitChanges ( ICorDebugProcess iface,
ULONG  cSnapshots,
ICorDebugEditAndContinueSnapshot pSnapshots[],
ICorDebugErrorInfoEnum **  pError 
)
static

Definition at line 190 of file cordebug.c.

193 {
195  FIXME("stub %p\n", This);
196  return E_NOTIMPL;
197 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:45

◆ cordebugprocess_Continue()

static HRESULT WINAPI cordebugprocess_Continue ( ICorDebugProcess iface,
BOOL  fIsOutOfBand 
)
static

Definition at line 116 of file cordebug.c.

117 {
119  TRACE("%p\n", This);
120 
121  if(This->thread)
122  ResumeThread(This->thread);
123 
124  return S_OK;
125 }
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
DWORD WINAPI ResumeThread(IN HANDLE hThread)
Definition: thread.c:566
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:45

◆ CorDebugProcess_Create()

static HRESULT CorDebugProcess_Create ( CorDebug cordebug,
IUnknown **  ppUnk,
LPPROCESS_INFORMATION  lpProcessInformation 
)
static

Definition at line 383 of file cordebug.c.

384 {
386 
387  This = HeapAlloc( GetProcessHeap(), 0, sizeof *This );
388  if ( !This )
389  return E_OUTOFMEMORY;
390 
391  if(!DuplicateHandle(GetCurrentProcess(), lpProcessInformation->hProcess,
393  {
394  ERR("Failed to duplicate process handle\n");
396  return E_FAIL;
397  }
398  if(!DuplicateHandle(GetCurrentProcess(), lpProcessInformation->hThread,
400  {
401  CloseHandle(This->handle);
402 
403  ERR("Failed to duplicate thread handle\n");
405  return E_FAIL;
406  }
407 
408  This->ICorDebugProcess_iface.lpVtbl = &cordebugprocessVtbl;
409  This->ref = 1;
410  This->cordebug = cordebug;
411  This->dwProcessID = lpProcessInformation->dwProcessId;
412 
413  if(This->cordebug)
414  ICorDebug_AddRef(&This->cordebug->ICorDebug_iface);
415 
416  *ppUnk = (IUnknown*)&This->ICorDebugProcess_iface;
417 
418  return S_OK;
419 }
#define CloseHandle
Definition: compat.h:398
#define E_FAIL
Definition: ddrawi.h:102
#define DUPLICATE_SAME_ACCESS
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
HANDLE WINAPI GetCurrentProcess(VOID)
Definition: proc.c:1138
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
static const ICorDebugProcessVtbl cordebugprocessVtbl
Definition: cordebug.c:349
#define HeapFree(x, y, z)
Definition: compat.h:394
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

Referenced by CorDebug_CreateProcess().

◆ cordebugprocess_Detach()

static HRESULT WINAPI cordebugprocess_Detach ( ICorDebugProcess iface)
static

Definition at line 158 of file cordebug.c.

159 {
161  FIXME("stub %p\n", This);
162  return E_NOTIMPL;
163 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:45

◆ cordebugprocess_EnableLogMessages()

static HRESULT WINAPI cordebugprocess_EnableLogMessages ( ICorDebugProcess iface,
BOOL  fOnOff 
)
static

Definition at line 299 of file cordebug.c.

301 {
303  FIXME("stub %p\n", This);
304  return E_NOTIMPL;
305 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:45

◆ cordebugprocess_EnumerateAppDomains()

static HRESULT WINAPI cordebugprocess_EnumerateAppDomains ( ICorDebugProcess iface,
ICorDebugAppDomainEnum **  ppAppDomains 
)
static

Definition at line 315 of file cordebug.c.

317 {
319  FIXME("stub %p\n", This);
320  return E_NOTIMPL;
321 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:45

◆ cordebugprocess_EnumerateObjects()

static HRESULT WINAPI cordebugprocess_EnumerateObjects ( ICorDebugProcess iface,
ICorDebugObjectEnum **  ppObjects 
)
static

Definition at line 233 of file cordebug.c.

235 {
237  FIXME("stub %p\n", This);
238  return E_NOTIMPL;
239 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:45

◆ cordebugprocess_EnumerateThreads()

static HRESULT WINAPI cordebugprocess_EnumerateThreads ( ICorDebugProcess iface,
ICorDebugThreadEnum **  ppThreads 
)
static

Definition at line 142 of file cordebug.c.

144 {
146  FIXME("stub %p\n", This);
147  return E_NOTIMPL;
148 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:45

◆ cordebugprocess_GetHandle()

static HRESULT WINAPI cordebugprocess_GetHandle ( ICorDebugProcess iface,
HPROCESS phProcessHandle 
)
static

Definition at line 212 of file cordebug.c.

213 {
215  TRACE("%p\n", This);
216 
217  if(!phProcessHandle)
218  return E_INVALIDARG;
219 
220  *phProcessHandle = This->handle;
221 
222  return S_OK;
223 }
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:45

◆ cordebugprocess_GetHelperThreadID()

static HRESULT WINAPI cordebugprocess_GetHelperThreadID ( ICorDebugProcess iface,
DWORD pThreadID 
)
static

Definition at line 339 of file cordebug.c.

341 {
343  FIXME("stub %p\n", This);
344  return E_NOTIMPL;
345 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:45

◆ cordebugprocess_GetID()

static HRESULT WINAPI cordebugprocess_GetID ( ICorDebugProcess iface,
DWORD pdwProcessId 
)
static

Definition at line 199 of file cordebug.c.

200 {
202  TRACE("%p\n", This);
203 
204  if(!pdwProcessId)
205  return E_INVALIDARG;
206 
207  *pdwProcessId = This->dwProcessID;
208 
209  return S_OK;
210 }
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:45

◆ cordebugprocess_GetObject()

static HRESULT WINAPI cordebugprocess_GetObject ( ICorDebugProcess iface,
ICorDebugValue **  ppObject 
)
static

Definition at line 323 of file cordebug.c.

325 {
327  FIXME("stub %p\n", This);
328  return E_NOTIMPL;
329 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:45

◆ cordebugprocess_GetThread()

static HRESULT WINAPI cordebugprocess_GetThread ( ICorDebugProcess iface,
DWORD  dwThreadId,
ICorDebugThread **  ppThread 
)
static

Definition at line 225 of file cordebug.c.

227 {
229  FIXME("stub %p\n", This);
230  return E_NOTIMPL;
231 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:45

◆ cordebugprocess_GetThreadContext()

static HRESULT WINAPI cordebugprocess_GetThreadContext ( ICorDebugProcess iface,
DWORD  threadID,
ULONG32  contextSize,
BYTE  context[] 
)
static

Definition at line 257 of file cordebug.c.

259 {
261  FIXME("stub %p\n", This);
262  return E_NOTIMPL;
263 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:45

◆ cordebugprocess_HasQueuedCallbacks()

static HRESULT WINAPI cordebugprocess_HasQueuedCallbacks ( ICorDebugProcess iface,
ICorDebugThread pThread,
BOOL pbQueued 
)
static

Definition at line 134 of file cordebug.c.

136 {
138  FIXME("stub %p\n", This);
139  return E_NOTIMPL;
140 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:45

◆ cordebugprocess_IsOSSuspended()

static HRESULT WINAPI cordebugprocess_IsOSSuspended ( ICorDebugProcess iface,
DWORD  threadID,
BOOL pbSuspended 
)
static

Definition at line 249 of file cordebug.c.

251 {
253  FIXME("stub %p\n", This);
254  return E_NOTIMPL;
255 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:45

◆ cordebugprocess_IsRunning()

static HRESULT WINAPI cordebugprocess_IsRunning ( ICorDebugProcess iface,
BOOL pbRunning 
)
static

Definition at line 127 of file cordebug.c.

128 {
130  FIXME("stub %p\n", This);
131  return E_NOTIMPL;
132 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:45

◆ cordebugprocess_IsTransitionStub()

static HRESULT WINAPI cordebugprocess_IsTransitionStub ( ICorDebugProcess iface,
CORDB_ADDRESS  address,
BOOL pbTransitionStub 
)
static

Definition at line 241 of file cordebug.c.

243 {
245  FIXME("stub %p\n", This);
246  return E_NOTIMPL;
247 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:45

◆ cordebugprocess_ModifyLogSwitch()

static HRESULT WINAPI cordebugprocess_ModifyLogSwitch ( ICorDebugProcess iface,
WCHAR pLogSwitchName,
LONG  lLevel 
)
static

Definition at line 307 of file cordebug.c.

309 {
311  FIXME("stub %p\n", This);
312  return E_NOTIMPL;
313 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:45

◆ cordebugprocess_QueryInterface()

static HRESULT WINAPI cordebugprocess_QueryInterface ( ICorDebugProcess iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 51 of file cordebug.c.

53 {
55 
56  TRACE("%p %s %p\n", This, debugstr_guid(riid), ppvObject);
57 
58  if ( IsEqualGUID( riid, &IID_ICorDebugProcess ) ||
59  IsEqualGUID( riid, &IID_ICorDebugController ) ||
61  {
62  *ppvObject = &This->ICorDebugProcess_iface;
63  }
64  else
65  {
66  FIXME("Unsupported interface %s\n", debugstr_guid(riid));
67  return E_NOINTERFACE;
68  }
69 
70  ICorDebugProcess_AddRef(iface);
71 
72  return S_OK;
73 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:45

◆ cordebugprocess_ReadMemory()

static HRESULT WINAPI cordebugprocess_ReadMemory ( ICorDebugProcess iface,
CORDB_ADDRESS  address,
DWORD  size,
BYTE  buffer[],
SIZE_T read 
)
static

Definition at line 273 of file cordebug.c.

276 {
278  FIXME("stub %p\n", This);
279  return E_NOTIMPL;
280 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:45

◆ cordebugprocess_Release()

static ULONG WINAPI cordebugprocess_Release ( ICorDebugProcess iface)
static

Definition at line 85 of file cordebug.c.

86 {
89 
90  TRACE("%p ref=%u\n", This, ref);
91 
92  if (ref == 0)
93  {
94  if(This->handle)
95  CloseHandle(This->handle);
96 
97  if(This->thread)
98  CloseHandle(This->thread);
99 
100  if(This->cordebug)
101  ICorDebug_Release(&This->cordebug->ICorDebug_iface);
102 
104  }
105 
106  return ref;
107 }
#define CloseHandle
Definition: compat.h:398
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:45
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ cordebugprocess_SetAllThreadsDebugState()

static HRESULT WINAPI cordebugprocess_SetAllThreadsDebugState ( ICorDebugProcess iface,
CorDebugThreadState  state,
ICorDebugThread pExceptThisThread 
)
static

Definition at line 150 of file cordebug.c.

152 {
154  FIXME("stub %p\n", This);
155  return E_NOTIMPL;
156 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:45

◆ cordebugprocess_SetThreadContext()

static HRESULT WINAPI cordebugprocess_SetThreadContext ( ICorDebugProcess iface,
DWORD  threadID,
ULONG32  contextSize,
BYTE  context[] 
)
static

Definition at line 265 of file cordebug.c.

267 {
269  FIXME("stub %p\n", This);
270  return E_NOTIMPL;
271 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:45

◆ cordebugprocess_Stop()

static HRESULT WINAPI cordebugprocess_Stop ( ICorDebugProcess iface,
DWORD  dwTimeoutIgnored 
)
static

Definition at line 109 of file cordebug.c.

110 {
112  FIXME("stub %p\n", This);
113  return E_NOTIMPL;
114 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:45

◆ cordebugprocess_Terminate()

static HRESULT WINAPI cordebugprocess_Terminate ( ICorDebugProcess iface,
UINT  exitCode 
)
static

Definition at line 165 of file cordebug.c.

166 {
168  BOOL ret = TRUE;
169 
170  TRACE("%p\n", This);
171 
172  if(This->handle)
173  {
174  ret = TerminateProcess(This->handle, exitCode);
175  CloseHandle(This->handle);
176  This->handle = NULL;
177  }
178  return ret ? S_OK : E_FAIL;
179 }
#define TRUE
Definition: types.h:120
#define CloseHandle
Definition: compat.h:398
#define E_FAIL
Definition: ddrawi.h:102
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
int ret
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI TerminateProcess(IN HANDLE hProcess, IN UINT uExitCode)
Definition: proc.c:1532
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:45

◆ cordebugprocess_ThreadForFiberCookie()

static HRESULT WINAPI cordebugprocess_ThreadForFiberCookie ( ICorDebugProcess iface,
DWORD  fiberCookie,
ICorDebugThread **  ppThread 
)
static

Definition at line 331 of file cordebug.c.

333 {
335  FIXME("stub %p\n", This);
336  return E_NOTIMPL;
337 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:45

◆ cordebugprocess_WriteMemory()

static HRESULT WINAPI cordebugprocess_WriteMemory ( ICorDebugProcess iface,
CORDB_ADDRESS  address,
DWORD  size,
BYTE  buffer[],
SIZE_T written 
)
static

Definition at line 282 of file cordebug.c.

285 {
287  FIXME("stub %p\n", This);
288  return E_NOTIMPL;
289 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static DebugProcess * impl_from_ICorDebugProcess(ICorDebugProcess *iface)
Definition: cordebug.c:45

◆ impl_from_ICorDebug()

static CorDebug* impl_from_ICorDebug ( ICorDebug iface)
inlinestatic

Definition at line 35 of file cordebug.c.

36 {
37  return CONTAINING_RECORD(iface, CorDebug, ICorDebug_iface);
38 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by CorDebug_AddRef(), CorDebug_CanLaunchOrAttach(), CorDebug_CreateProcess(), CorDebug_DebugActiveProcess(), CorDebug_EnumerateProcesses(), CorDebug_GetProcess(), CorDebug_Initialize(), CorDebug_QueryInterface(), CorDebug_Release(), CorDebug_SetManagedHandler(), CorDebug_SetUnmanagedHandler(), and CorDebug_Terminate().

◆ impl_from_ICorDebugProcess()

static DebugProcess* impl_from_ICorDebugProcess ( ICorDebugProcess iface)
inlinestatic

◆ impl_from_ICorDebugProcessEnum()

static CorDebug* impl_from_ICorDebugProcessEnum ( ICorDebugProcessEnum iface)
inlinestatic

Definition at line 40 of file cordebug.c.

41 {
42  return CONTAINING_RECORD(iface, CorDebug, ICorDebugProcessEnum_iface);
43 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by process_enum_AddRef(), process_enum_Clone(), process_enum_GetCount(), process_enum_Next(), process_enum_QueryInterface(), process_enum_Release(), process_enum_Reset(), and process_enum_Skip().

◆ process_enum_AddRef()

static ULONG WINAPI process_enum_AddRef ( ICorDebugProcessEnum iface)
static

Definition at line 445 of file cordebug.c.

446 {
448  TRACE("%p ref=%u\n", This, This->ref);
449 
450  return ICorDebug_AddRef(&This->ICorDebug_iface);
451 }
static CorDebug * impl_from_ICorDebugProcessEnum(ICorDebugProcessEnum *iface)
Definition: cordebug.c:40
#define TRACE(s)
Definition: solgame.cpp:4

◆ process_enum_Clone()

static HRESULT WINAPI process_enum_Clone ( ICorDebugProcessEnum iface,
ICorDebugEnum **  ppEnum 
)
static

Definition at line 475 of file cordebug.c.

476 {
478  FIXME("stub %p %p\n", This, ppEnum);
479  return E_NOTIMPL;
480 }
static CorDebug * impl_from_ICorDebugProcessEnum(ICorDebugProcessEnum *iface)
Definition: cordebug.c:40
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ process_enum_GetCount()

static HRESULT WINAPI process_enum_GetCount ( ICorDebugProcessEnum iface,
ULONG pcelt 
)
static

Definition at line 482 of file cordebug.c.

483 {
485  TRACE("stub %p %p\n", This, pcelt);
486 
487  if(!pcelt)
488  return E_INVALIDARG;
489 
490  *pcelt = list_count(&This->processes);
491 
492  return S_OK;
493 }
static CorDebug * impl_from_ICorDebugProcessEnum(ICorDebugProcessEnum *iface)
Definition: cordebug.c:40
__WINE_SERVER_LIST_INLINE unsigned int list_count(const struct list *list)
Definition: list.h:155
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

◆ process_enum_Next()

static HRESULT WINAPI process_enum_Next ( ICorDebugProcessEnum iface,
ULONG  celt,
ICorDebugProcess processes[],
ULONG pceltFetched 
)
static

Definition at line 495 of file cordebug.c.

497 {
499  FIXME("stub %p %d %p %p\n", This, celt, processes, pceltFetched);
500  return E_NOTIMPL;
501 }
static CorDebug * impl_from_ICorDebugProcessEnum(ICorDebugProcessEnum *iface)
Definition: cordebug.c:40
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ process_enum_QueryInterface()

static HRESULT WINAPI process_enum_QueryInterface ( ICorDebugProcessEnum iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 422 of file cordebug.c.

423 {
425 
426  TRACE("%p %s %p\n", This, debugstr_guid(riid), ppvObject);
427 
428  if ( IsEqualGUID( riid, &IID_ICorDebugProcessEnum ) ||
429  IsEqualGUID( riid, &IID_ICorDebugEnum ) ||
431  {
432  *ppvObject = &This->ICorDebugProcessEnum_iface;
433  }
434  else
435  {
436  FIXME("Unsupported interface %s\n", debugstr_guid(riid));
437  return E_NOINTERFACE;
438  }
439 
440  ICorDebugProcessEnum_AddRef(iface);
441 
442  return S_OK;
443 }
static CorDebug * impl_from_ICorDebugProcessEnum(ICorDebugProcessEnum *iface)
Definition: cordebug.c:40
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021

◆ process_enum_Release()

static ULONG WINAPI process_enum_Release ( ICorDebugProcessEnum iface)
static

Definition at line 453 of file cordebug.c.

454 {
456  TRACE("%p ref=%u\n", This, This->ref);
457 
458  return ICorDebug_Release(&This->ICorDebug_iface);
459 }
static CorDebug * impl_from_ICorDebugProcessEnum(ICorDebugProcessEnum *iface)
Definition: cordebug.c:40
#define TRACE(s)
Definition: solgame.cpp:4

◆ process_enum_Reset()

static HRESULT WINAPI process_enum_Reset ( ICorDebugProcessEnum iface)
static

Definition at line 468 of file cordebug.c.

469 {
471  FIXME("stub %p\n", This);
472  return E_NOTIMPL;
473 }
static CorDebug * impl_from_ICorDebugProcessEnum(ICorDebugProcessEnum *iface)
Definition: cordebug.c:40
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ process_enum_Skip()

static HRESULT WINAPI process_enum_Skip ( ICorDebugProcessEnum iface,
ULONG  celt 
)
static

Definition at line 461 of file cordebug.c.

462 {
464  FIXME("stub %p\n", This);
465  return E_NOTIMPL;
466 }
static CorDebug * impl_from_ICorDebugProcessEnum(ICorDebugProcessEnum *iface)
Definition: cordebug.c:40
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

Variable Documentation

◆ cordebug_vtbl

const struct ICorDebugVtbl cordebug_vtbl
static
Initial value:
=
{
}
static ULONG WINAPI CorDebug_AddRef(ICorDebug *iface)
Definition: cordebug.c:538
static HRESULT WINAPI CorDebug_CanLaunchOrAttach(ICorDebug *iface, DWORD dwProcessId, BOOL win32DebuggingEnabled)
Definition: cordebug.c:718
static HRESULT WINAPI CorDebug_QueryInterface(ICorDebug *iface, REFIID riid, void **ppvObject)
Definition: cordebug.c:516
static HRESULT WINAPI CorDebug_EnumerateProcesses(ICorDebug *iface, ICorDebugProcessEnum **ppProcess)
Definition: cordebug.c:697
static HRESULT WINAPI CorDebug_SetUnmanagedHandler(ICorDebug *iface, ICorDebugUnmanagedCallback *pCallback)
Definition: cordebug.c:637
static HRESULT WINAPI CorDebug_DebugActiveProcess(ICorDebug *iface, DWORD id, BOOL win32Attach, ICorDebugProcess **ppProcess)
Definition: cordebug.c:689
static HRESULT WINAPI CorDebug_Initialize(ICorDebug *iface)
Definition: cordebug.c:576
static HRESULT WINAPI CorDebug_SetManagedHandler(ICorDebug *iface, ICorDebugManagedCallback *pCallback)
Definition: cordebug.c:604
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:644
static HRESULT WINAPI CorDebug_Terminate(ICorDebug *iface)
Definition: cordebug.c:583
static ULONG WINAPI CorDebug_Release(ICorDebug *iface)
Definition: cordebug.c:548
static HRESULT WINAPI CorDebug_GetProcess(ICorDebug *iface, DWORD dwProcessId, ICorDebugProcess **ppProcess)
Definition: cordebug.c:711

Definition at line 726 of file cordebug.c.

Referenced by CorDebug_Create().

◆ cordebugprocessVtbl

const ICorDebugProcessVtbl cordebugprocessVtbl
static

Definition at line 349 of file cordebug.c.

Referenced by CorDebugProcess_Create().

◆ processenum_vtbl

const struct ICorDebugProcessEnumVtbl processenum_vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI process_enum_Reset(ICorDebugProcessEnum *iface)
Definition: cordebug.c:468
static HRESULT WINAPI process_enum_Clone(ICorDebugProcessEnum *iface, ICorDebugEnum **ppEnum)
Definition: cordebug.c:475
static HRESULT WINAPI process_enum_QueryInterface(ICorDebugProcessEnum *iface, REFIID riid, void **ppvObject)
Definition: cordebug.c:422
static ULONG WINAPI process_enum_AddRef(ICorDebugProcessEnum *iface)
Definition: cordebug.c:445
static HRESULT WINAPI process_enum_GetCount(ICorDebugProcessEnum *iface, ULONG *pcelt)
Definition: cordebug.c:482
static HRESULT WINAPI process_enum_Skip(ICorDebugProcessEnum *iface, ULONG celt)
Definition: cordebug.c:461
static HRESULT WINAPI process_enum_Next(ICorDebugProcessEnum *iface, ULONG celt, ICorDebugProcess *processes[], ULONG *pceltFetched)
Definition: cordebug.c:495
static ULONG WINAPI process_enum_Release(ICorDebugProcessEnum *iface)
Definition: cordebug.c:453

Definition at line 503 of file cordebug.c.

Referenced by CorDebug_Create().