Exemple #1
0
VOID WvlDebugModuleUnload(void) {
    #if WVL_M_DEBUG
    if (WvlDebugBugCheckRegistered_)
      KeDeregisterBugCheckCallback(&WvlDebugBugCheckRecord_);
    #endif
    return;
  }
Exemple #2
0
VOID
NdisMDeregisterAdapterShutdownHandler(
	IN	NDIS_HANDLE				MiniportHandle
	)
/*++

Routine Description:

Arguments:

	MiniportHandle - The miniport.

Return Value:

	None.

--*/
{
	PNDIS_MINIPORT_BLOCK Miniport = (PNDIS_MINIPORT_BLOCK) MiniportHandle;
	PNDIS_WRAPPER_CONTEXT WrapperContext = Miniport->WrapperContext;

	//
	// Clear information
	//

	if (WrapperContext->ShutdownHandler != NULL)
	{
		KeDeregisterBugCheckCallback(&WrapperContext->BugcheckCallbackRecord);
		WrapperContext->ShutdownHandler = NULL;
	}
}
Exemple #3
0
VOID
DebugTeardown(
    IN OUT  PXENBUS_DEBUG_INTERFACE     Interface
    )
{
    PXENBUS_DEBUG_CONTEXT               Context = Interface->Context;

    Trace("====>\n");

    (VOID) KeDeregisterBugCheckCallback(&Context->BugCheckCallbackRecord);
    RtlZeroMemory(&Context->BugCheckCallbackRecord, sizeof (KBUGCHECK_CALLBACK_RECORD));

    if (!IsListEmpty(&Context->List)) {
        PLIST_ENTRY ListEntry;

        for (ListEntry = Context->List.Flink;
             ListEntry != &Context->List;
             ListEntry = ListEntry->Flink) {
            PXENBUS_DEBUG_CALLBACK  Callback;
            PCHAR                   Name;
            ULONG_PTR               Offset;

            Callback = CONTAINING_RECORD(ListEntry, XENBUS_DEBUG_CALLBACK, ListEntry);

            ModuleLookup((ULONG_PTR)Callback->Caller, &Name, &Offset);

            if (Name != NULL) {
                Error("CALLBACK: %p PREFIX '%s' REGISTERED BY %s + %p\n",
                      Callback->Function,
                      Callback->Prefix,
                      Name,
                      (PVOID)Offset);
            } else {
                Error("CALLBACK: %p PREFIX '%s' REGISTERED BY %p\n",
                      Callback->Function,
                      Callback->Prefix,
                      Callback->Caller);
            }
        }

        BUG("OUTSTANDING CALLBACKS");
    }

    RtlZeroMemory(&Context->Lock, sizeof (KSPIN_LOCK));
    RtlZeroMemory(&Context->List, sizeof (LIST_ENTRY));

    ASSERT(IsZeroMemory(Context, sizeof (XENBUS_DEBUG_CONTEXT)));
    __DebugFree(Context);

    RtlZeroMemory(Interface, sizeof (XENBUS_DEBUG_INTERFACE));

    Trace("<====\n");
}
BOOLEAN PVPanicDeregisterBugCheckCallback()
{
	return KeDeregisterBugCheckCallback(&CallbackRecord);
}