Working with MS VM
 In this topic

*IRemoteDebugManager : IUnknown

*IEnumRemoteProcess : IUnknown

*IRemoteDebugManagerCallback : IUnknown

*IRemoteProcess : IUnknown

*IRemoteProcessCallback : IUnknown

 

Microsoft VM    PreviousVMNext
Java Debugger Interfaces     Previous VM Next

 


Registration and Notification Interfaces

Use these interfaces to register namespaces for debugging and to receive notification of new namespaces.

IRemoteDebugManager : IUnknown

Provides access to all currently running namespaces. Also provides a way to debug new namespaces.

RegisterCallback

HRESULT RegisterCallback(IRemoteDebugManagerCallback *pCallback)

ParameterDescription
[in] pCallback Callback that should receive notification about new namespace creations.

Detach

HRESULT Detach(void)

Detaches the IRemoteDebugManagerCallback attached by the previous call to RegisterCallback.

GetActiveProcesses

HRESULT GetActiveProcesses(IEnumRemoteProcess **ppEnum)

ParameterDescription
[out] ppEnum Returns an enumerator for all the currently running namespaces in the system.

RequestCreateEvent

HRESULT RequestCreateEvent(LPCOLESTR pcszProcessName, DWORD dwParentProcessId)

Notifies the debug manager that the debugger is interested in debugging the named applet when it is run in the given host Microsoft® Win32® process.

ParameterDescription
[in] pcszProcessName Name of the applet class to debug.
[in] dwParentProcessId Win32® process ID of the process that the applet will be run in.

IEnumRemoteProcess : IUnknown

Enumerates running namespaces.

Next

HRESULT Next(ULONG celt, IRemoteProcess *rgelt[], ULONG *pceltFetched)

Skip

HRESULT Skip(ULONG celt)

Reset

HRESULT Reset(void)

Clone

HRESULT Clone(IEnumRemoteProcess **ppEnum)

IRemoteDebugManagerCallback : IUnknown

Notifies the debugger about requested new namespace creations.

ProcessCreateEvent

HRESULT ProcessCreateEvent(IRemoteProcess *pProcessNew, IRemoteProcess *pProcessParent)

This notification is sent when a new namespace is being created. The pProcessParent parameter is NULL if the namespace is not being created as the child of another namespace.

ParameterDescription
[in] pProcessNew Namespace being created.
[in] pProcessParent Namespace that caused the new namespace to be created.

IRemoteProcess : IUnknown

Represents a single Java namespace running within a Java VM. Note that it does not represent the operating system process that the Java VM is being run in.

RegisterCallback

HRESULT RegisterCallback(IRemoteProcessCallback *pCallback)

Tells the namespace that it is being debugged, and provides a callback that is to receive debug event notifications.

ParameterDescription
[in] pCallback Address of the interface that is to receive notifications for this namespace.

Detach

HRESULT Detach(void)

Detaches the IRemoteProcessCallback registered by the previous call to RegisterProcess.

Break

HRESULT Break(void)

Performs an asynchronous break on all threads in this namespace. All threads will be stopped in break state. This is an asynchronous function call.

GetGlobalContainerObject

HRESULT GetGlobalContainerObject(IRemoteContainerObject **ppGlobalContainerObject)

ParameterDescription
[out] ppGlobalContainerObject Returns the global object for this namespace.

FindClass

HRESULT FindClass(LPCOLESTR pcszClassName, IRemoteClassField **ppClassType)

ParameterDescription
[in] pcszClassName Name of the class to find.
[out] ppClassType Returns the specified class. If the class is not already loaded in the namespace, it is loaded.

TraceMethods

HRESULT TraceMethods(BOOL bTraceOn)

When method call tracing is on, each method call generates a call to IRemoteProcessCallback::TraceEvent.

ParameterDescription
[in] bTraceOn Set to TRUE to enable method call tracing, or FALSE to disable method call tracing.

GetThreadGroups

HRESULT GetThreadGroups(IEnumRemoteThreadGroup **ppEnum)

ParameterDescription
[out] ppEnum Returns an enumerator for the thread groups in the namespace.

IRemoteProcessCallback : IUnknown

Communicates asynchronous notifications from the Java VM to the debugger. No debuggee execution occurs during the handling of these events. The debugger returns S_OK to leave execution suspended in the source namespace, or S_FALSE to continue execution in the source namespace. The pThread input argument to each event notification method is a thread object that represents the thread that generated the event.

DebugStringEvent

HRESULT DebugStringEvent(IRemoteThread *pThread, LPCOLESTR pcszDebugString)

Notification sent when the debuggee outputs a string.

ParameterDescription
[in] pcszDebugString String from the debuggee.

CodeBreakpointEvent

HRESULT CodeBreakpointEvent(IRemoteThread *pThread)

Notification sent when a code breakpoint has been hit in the debugger.

DataBreakpointEvent

HRESULT DataBreakpointEvent(IRemoteThread *pThread, IRemoteObject *pObject)

Notification sent when a data breakpoint has been hit in the debugger.

ParameterDescription
[in] pObject Object that changed to cause the breakpoint to be triggered.

ExceptionEvent

HRESULT ExceptionEvent(IRemoteThread *pThread, IRemoteClassField *pExceptionClass, EXCEPTIONKIND exceptionKind)

Notification sent when an exception occurs.

ParameterDescription
[in] pExceptionClass Class of the thrown object.
[in] exceptionKind Kind of exception that occurred.
typedef enum exceptionkind {
	EXCEPTION_KIND_FIRST_CHANCE	= 0x01,
	EXCEPTION_KIND_LAST_CHANCE	= 0x02,
} EXCEPTIONKIND;

StepEvent

HRESULT StepEvent(IRemoteThread *pThread)

Notification sent when an execution step completes.

CanStopEvent

HRESULT CanStopEvent(IRemoteThread *pThread)

Notification sent during a range step when the debuggee makes a function call.

BreakEvent

HRESULT BreakEvent(IRemoteThread *pThread)

Notification sent when an asynchronous break occurs in response to IRemoteProcess::Break.

ThreadCreateEvent

HRESULT ThreadCreateEvent(IRemoteThread *pThread)

Notification sent when a thread is created.

ThreadDestroyEvent

HRESULT ThreadDestroyEvent(IRemoteThread *pThread)

Notification sent when a thread is destroyed.

ThreadGroupCreateEvent

HRESULT ThreadGroupCreateEvent(IRemoteThread *pThread, IRemoteThreadGroup *pThreadGroup)

Notification sent when a thread group is created.

ParameterDescription
[in] pThreadGroup New thread group.

ThreadGroupDestroyEvent

HRESULT ThreadGroupDestroyEvent(IRemoteThread *pThread, IRemoteThreadGroup *pThreadGroup)

Notification sent when a thread group is destroyed.

ParameterDescription
[in] pThreadGroup Destroyed thread group.

ClassLoadEvent

HRESULT ClassLoadEvent(IRemoteThread *pThread, IRemoteClassField *pClassType)

Notification sent when a class is loaded.

ParameterDescription
[in] pClassType Loaded class.

LoadCompleteEvent

HRESULT LoadCompleteEvent(IRemoteThread *pThread)

Notification sent when all classes have been loaded.

ClassUnloadEvent

HRESULT ClassUnloadEvent(IRemoteThread *pThread, IRemoteClassField *pClassType)

Notification sent when a class is unloaded.

ParameterDescription
[in] pClassType Unloaded class.

TraceEvent

HRESULT TraceEvent(IRemoteThread *pThread)

Notification sent while tracing is enabled when a method is entered.

ProcessDestroyEvent

HRESULT ProcessDestroyEvent(IRemoteThread *pThread)

Notification sent when the namespace terminates. No further notifications are sent after ProcessDestroyEvent.

Top © 1998 Microsoft Corporation. All rights reserved. Terms of use.