[REACTOS]

Fix the debugging macros introduced in r58132 (for the _FATAL case):
do not use exceptions but instead a breakpoint followed by a process termination procedure (or a bugcheck if we are in kernel mode).
Feel free to improve them !!

[DRIVERS-HAL]
Finish to use the new debugging macros

Part 3/3

svn path=/trunk/; revision=58154
This commit is contained in:
Hermès Bélusca-Maïto 2013-01-10 01:45:22 +00:00
parent eeb38cd038
commit cb2a5efc11
26 changed files with 115 additions and 184 deletions

View file

@ -261,8 +261,7 @@ Device_GetAdditionalResourceDescriptors(IN PPCI_CONFIGURATOR_CONTEXT Context,
IN PIO_RESOURCE_DESCRIPTOR IoDescriptor)
{
/* Not yet implemented */
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
}
VOID
@ -271,8 +270,7 @@ Device_ResetDevice(IN PPCI_PDO_EXTENSION PdoExtension,
IN PPCI_COMMON_HEADER PciData)
{
/* Not yet implemented */
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
}
VOID
@ -281,8 +279,7 @@ Device_ChangeResourceSettings(IN PPCI_PDO_EXTENSION PdoExtension,
IN PPCI_COMMON_HEADER PciData)
{
/* Not yet implemented */
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
}
/* EOF */

View file

@ -147,14 +147,12 @@ PciComputeNewCurrentSettings(IN PPCI_PDO_EXTENSION PdoExtension,
{
/* Not used in the driver yet */
case 1:
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
break;
/* Not used in the driver yet */
case 2:
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
break;
/* A drain request */
@ -540,8 +538,7 @@ PciQueryEjectionRelations(IN PPCI_PDO_EXTENSION PdoExtension,
IN OUT PDEVICE_RELATIONS *pDeviceRelations)
{
/* Not yet implemented */
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_NOT_IMPLEMENTED;
}
@ -599,8 +596,7 @@ PciQueryRequirements(IN PPCI_PDO_EXTENSION PdoExtension,
(ExIsProcessorFeaturePresent(PF_PAE_ENABLED)))
{
/* Have not tested this on eVb's machine yet */
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
}
/* Check if the requirements are actually the zero list */
@ -1522,8 +1518,7 @@ PciProcessBus(IN PPCI_FDO_EXTENSION DeviceExtension)
if (!PCI_IS_ROOT_FDO(DeviceExtension))
{
/* Not really handling this year */
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
/* Check for PCI bridges with the ISA bit set, or required */
if ((PdoExtension) &&
@ -1532,8 +1527,7 @@ PciProcessBus(IN PPCI_FDO_EXTENSION DeviceExtension)
(PdoExtension->Dependent.type1.IsaBitSet)))
{
/* We'll need to do some legacy support */
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
}
}
else
@ -1547,8 +1541,7 @@ PciProcessBus(IN PPCI_FDO_EXTENSION DeviceExtension)
if (PdoExtension->Dependent.type1.VgaBitSet)
{
/* Again, some more legacy support we'll have to do */
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
}
}
}
@ -1557,8 +1550,7 @@ PciProcessBus(IN PPCI_FDO_EXTENSION DeviceExtension)
if (PciAssignBusNumbers)
{
/* Not yet supported */
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
}
}
@ -1605,9 +1597,7 @@ PciScanBus(IN PPCI_FDO_EXTENSION DeviceExtension)
sizeof(UCHAR));
if (SecondaryBus != PdoExtension->Dependent.type1.SecondaryBus)
{
DPRINT1("PCI: Bus numbers have been changed! Restoring originals.\n");
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK("PCI: Bus numbers have been changed! Restoring originals.\n");
}
}
@ -1668,8 +1658,7 @@ PciScanBus(IN PPCI_FDO_EXTENSION DeviceExtension)
if (WdTable)
{
/* Check if this PCI device is the ACPI Watchdog Device... */
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
}
/* Check for non-simple devices */
@ -1734,8 +1723,7 @@ PciScanBus(IN PPCI_FDO_EXTENSION DeviceExtension)
if (PdoExtension)
{
/* Rescan scenarios are not yet implemented */
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
}
/* Bus processing will need to happen */
@ -2197,8 +2185,7 @@ PciSetResources(IN PPCI_PDO_EXTENSION PdoExtension,
(FdoExtension->HotPlugParameters.Acquired))
{
/* Don't have hotplug devices to test with yet, QEMU 0.14 should */
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
}
/* Locate the correct resource configurator for this type of device */

View file

@ -93,8 +93,7 @@ PciFdoIrpStartDevice(IN PIRP Irp,
{
/* These resources would only be for non-root FDOs, unhandled for now */
ASSERT(Resources->Count == 1);
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
}
/* Initialize the arbiter for this FDO */
@ -111,8 +110,7 @@ PciFdoIrpStartDevice(IN PIRP Irp,
{
/* Unhandled for now */
ASSERT(Resources->Count == 1);
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
}
/* Commit the transition to the started state */
@ -136,8 +134,7 @@ PciFdoIrpRemoveDevice(IN PIRP Irp,
IN PIO_STACK_LOCATION IoStackLocation,
IN PPCI_FDO_EXTENSION DeviceExtension)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_NOT_SUPPORTED;
}
@ -147,8 +144,7 @@ PciFdoIrpCancelRemoveDevice(IN PIRP Irp,
IN PIO_STACK_LOCATION IoStackLocation,
IN PPCI_FDO_EXTENSION DeviceExtension)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_NOT_SUPPORTED;
}
@ -158,8 +154,7 @@ PciFdoIrpStopDevice(IN PIRP Irp,
IN PIO_STACK_LOCATION IoStackLocation,
IN PPCI_FDO_EXTENSION DeviceExtension)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_NOT_SUPPORTED;
}
@ -169,8 +164,7 @@ PciFdoIrpQueryStopDevice(IN PIRP Irp,
IN PIO_STACK_LOCATION IoStackLocation,
IN PPCI_FDO_EXTENSION DeviceExtension)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_NOT_SUPPORTED;
}
@ -180,8 +174,7 @@ PciFdoIrpCancelStopDevice(IN PIRP Irp,
IN PIO_STACK_LOCATION IoStackLocation,
IN PPCI_FDO_EXTENSION DeviceExtension)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_NOT_SUPPORTED;
}
@ -318,8 +311,7 @@ PciFdoIrpDeviceUsageNotification(IN PIRP Irp,
IN PIO_STACK_LOCATION IoStackLocation,
IN PPCI_FDO_EXTENSION DeviceExtension)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_NOT_SUPPORTED;
}
@ -329,8 +321,7 @@ PciFdoIrpSurpriseRemoval(IN PIRP Irp,
IN PIO_STACK_LOCATION IoStackLocation,
IN PPCI_FDO_EXTENSION DeviceExtension)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_NOT_SUPPORTED;
}
@ -340,8 +331,7 @@ PciFdoIrpQueryLegacyBusInformation(IN PIRP Irp,
IN PIO_STACK_LOCATION IoStackLocation,
IN PPCI_FDO_EXTENSION DeviceExtension)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_NOT_SUPPORTED;
}
@ -392,8 +382,7 @@ PciGetHotPlugParameters(IN PPCI_FDO_EXTENSION FdoExtension)
if (OutputBuffer->Count != 4) break;
/* HotPlug PCI Support not yet implemented */
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
} while (FALSE);
/* Free the buffer and return */
@ -544,17 +533,14 @@ PciAddDevice(IN PDRIVER_OBJECT DriverObject,
else
{
/* Root PDO in ReactOS does not assign boot resources */
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
DPRINT1("Encountered during setup\n");
UNIMPLEMENTED_DBGBREAK("Encountered during setup\n");
Descriptor = NULL;
}
if (Descriptor)
{
/* Root PDO in ReactOS does not assign boot resources */
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
}
else
{

View file

@ -678,8 +678,7 @@ NTAPI
PciGetDebugPorts(IN HANDLE DebugKey)
{
/* This function is not yet implemented */
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_SUCCESS;
}
@ -688,9 +687,7 @@ NTAPI
PciDriverUnload(IN PDRIVER_OBJECT DriverObject)
{
/* This function is not yet implemented */
DPRINT1("PCI: Unload\n");
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK("PCI: Unload\n");
}
NTSTATUS

View file

@ -58,8 +58,7 @@ agpintrf_Constructor(IN PVOID DeviceExtension,
}
/* Not yet implemented */
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_NOT_IMPLEMENTED;
}

View file

@ -48,8 +48,7 @@ busintrf_Constructor(IN PVOID DeviceExtension,
IN PINTERFACE Interface)
{
/* Not yet implemented */
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_NOT_IMPLEMENTED;
}

View file

@ -33,32 +33,28 @@ VOID
NTAPI
Cardbus_SaveCurrentSettings(IN PPCI_CONFIGURATOR_CONTEXT Context)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
}
VOID
NTAPI
Cardbus_SaveLimits(IN PPCI_CONFIGURATOR_CONTEXT Context)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
}
VOID
NTAPI
Cardbus_MassageHeaderForLimitsDetermination(IN PPCI_CONFIGURATOR_CONTEXT Context)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
}
VOID
NTAPI
Cardbus_RestoreCurrent(IN PPCI_CONFIGURATOR_CONTEXT Context)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
}
VOID
@ -67,8 +63,7 @@ Cardbus_GetAdditionalResourceDescriptors(IN PPCI_CONFIGURATOR_CONTEXT Context,
IN PPCI_COMMON_HEADER PciData,
IN PIO_RESOURCE_DESCRIPTOR IoDescriptor)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
}
VOID
@ -76,8 +71,7 @@ NTAPI
Cardbus_ResetDevice(IN PPCI_PDO_EXTENSION PdoExtension,
IN PPCI_COMMON_HEADER PciData)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
}
VOID
@ -85,8 +79,7 @@ NTAPI
Cardbus_ChangeResourceSettings(IN PPCI_PDO_EXTENSION PdoExtension,
IN PPCI_COMMON_HEADER PciData)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
}
NTSTATUS
@ -108,8 +101,7 @@ pcicbintrf_Constructor(IN PVOID DeviceExtension,
IN PINTERFACE Interface)
{
/* Not yet implemented */
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_NOT_IMPLEMENTED;
}

View file

@ -50,8 +50,7 @@ devpresent_Constructor(IN PVOID DeviceExtension,
PAGED_CODE();
/* Not yet implemented */
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_NOT_IMPLEMENTED;
}

View file

@ -48,8 +48,7 @@ lddintrf_Constructor(IN PVOID DeviceExtension,
IN PINTERFACE Interface)
{
/* Not yet implemented */
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_NOT_IMPLEMENTED;
}

View file

@ -48,8 +48,7 @@ locintrf_Constructor(IN PVOID DeviceExtension,
IN PINTERFACE Interface)
{
/* Not yet implemented */
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_NOT_IMPLEMENTED;
}

View file

@ -51,8 +51,7 @@ PciPmeInterfaceConstructor(IN PVOID DeviceExtension,
if (Version != PCI_PME_INTRF_STANDARD_VER) return STATUS_NOINTERFACE;
/* Not yet implemented */
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_NOT_IMPLEMENTED;
}

View file

@ -53,8 +53,7 @@ routeintrf_Constructor(IN PVOID DeviceExtension,
if (Version != PCI_INT_ROUTE_INTRF_STANDARD_VER) return STATUS_NOINTERFACE;
/* Not yet implemented */
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_NOT_IMPLEMENTED;
}

View file

@ -65,8 +65,7 @@ PciReadWriteConfigSpace(IN PPCI_FDO_EXTENSION DeviceExtension,
if (PciInterface)
{
/* Currently this driver only supports the legacy HAL interface */
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
}
else
{

View file

@ -671,8 +671,7 @@ NTAPI
PPBridge_ResetDevice(IN PPCI_PDO_EXTENSION PdoExtension,
IN PPCI_COMMON_HEADER PciData)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
}
VOID

View file

@ -79,8 +79,7 @@ PciVerifierProfileChangeCallback(IN PVOID NotificationStructure,
IN PVOID Context)
{
/* This function is not yet implemented */
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_SUCCESS;
}

View file

@ -79,8 +79,7 @@ PciPdoWaitWake(IN PIRP Irp,
IN PIO_STACK_LOCATION IoStackLocation,
IN PPCI_PDO_EXTENSION DeviceExtension)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_NOT_SUPPORTED;
}
@ -100,8 +99,7 @@ PciPdoIrpQueryPower(IN PIRP Irp,
IN PIO_STACK_LOCATION IoStackLocation,
IN PPCI_PDO_EXTENSION DeviceExtension)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_NOT_SUPPORTED;
}
@ -218,8 +216,7 @@ PciPdoIrpRemoveDevice(IN PIRP Irp,
IN PIO_STACK_LOCATION IoStackLocation,
IN PPCI_PDO_EXTENSION DeviceExtension)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_NOT_SUPPORTED;
}
@ -229,8 +226,7 @@ PciPdoIrpCancelRemoveDevice(IN PIRP Irp,
IN PIO_STACK_LOCATION IoStackLocation,
IN PPCI_PDO_EXTENSION DeviceExtension)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_NOT_SUPPORTED;
}
@ -240,8 +236,7 @@ PciPdoIrpStopDevice(IN PIRP Irp,
IN PIO_STACK_LOCATION IoStackLocation,
IN PPCI_PDO_EXTENSION DeviceExtension)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_NOT_SUPPORTED;
}
@ -251,8 +246,7 @@ PciPdoIrpQueryStopDevice(IN PIRP Irp,
IN PIO_STACK_LOCATION IoStackLocation,
IN PPCI_PDO_EXTENSION DeviceExtension)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_NOT_SUPPORTED;
}
@ -262,8 +256,7 @@ PciPdoIrpCancelStopDevice(IN PIRP Irp,
IN PIO_STACK_LOCATION IoStackLocation,
IN PPCI_PDO_EXTENSION DeviceExtension)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_NOT_SUPPORTED;
}
@ -273,8 +266,7 @@ PciPdoIrpQueryInterface(IN PIRP Irp,
IN PIO_STACK_LOCATION IoStackLocation,
IN PPCI_PDO_EXTENSION DeviceExtension)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_NOT_SUPPORTED;
}
@ -404,8 +396,7 @@ PciPdoIrpReadConfig(IN PIRP Irp,
IN PIO_STACK_LOCATION IoStackLocation,
IN PPCI_PDO_EXTENSION DeviceExtension)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_NOT_SUPPORTED;
}
@ -415,8 +406,7 @@ PciPdoIrpWriteConfig(IN PIRP Irp,
IN PIO_STACK_LOCATION IoStackLocation,
IN PPCI_PDO_EXTENSION DeviceExtension)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_NOT_SUPPORTED;
}
@ -436,8 +426,7 @@ PciPdoIrpDeviceUsageNotification(IN PIRP Irp,
IN PIO_STACK_LOCATION IoStackLocation,
IN PPCI_PDO_EXTENSION DeviceExtension)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_NOT_SUPPORTED;
}
@ -447,8 +436,7 @@ PciPdoIrpSurpriseRemoval(IN PIRP Irp,
IN PIO_STACK_LOCATION IoStackLocation,
IN PPCI_PDO_EXTENSION DeviceExtension)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_NOT_SUPPORTED;
}
@ -458,8 +446,7 @@ PciPdoIrpQueryLegacyBusInformation(IN PIRP Irp,
IN PIO_STACK_LOCATION IoStackLocation,
IN PPCI_PDO_EXTENSION DeviceExtension)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return STATUS_NOT_SUPPORTED;
}

View file

@ -191,8 +191,7 @@ PciSetPowerManagedDevicePowerState(IN PPCI_PDO_EXTENSION DeviceExtension,
if (DeviceState < DeviceExtension->PowerState.CurrentDeviceState)
{
/* We would normally re-assign resources after powerup */
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
Status = STATUS_NOT_IMPLEMENTED;
}
}

View file

@ -152,8 +152,7 @@ PciIsDatacenter(VOID)
else
{
/* This scenario shouldn't happen yet, since SetupDD isn't used */
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_FATAL("ReactOS doesn't use SetupDD for its setup device driver install program. Therefore this scenario must not happen!\n");
}
/* Return if this is Datacenter or not */
@ -757,8 +756,7 @@ PciIsDeviceOnDebugPath(IN PPCI_PDO_EXTENSION DeviceExtension)
if (!PciDebugPortsCount) return FALSE;
/* eVb has not been able to test such devices yet */
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
return FALSE;
}

View file

@ -813,8 +813,7 @@ NTAPI
HalpDispatchWmi(IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
DPRINT1("HAL: PnP Driver WMI!\n");
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK("HAL: PnP Driver WMI!\n");
return STATUS_SUCCESS;
}

View file

@ -217,8 +217,8 @@ HalpTrap0DHandler(IN PKTRAP_FRAME TrapFrame)
DPRINT1("HAL: Trap0D while not in V86 mode\n");
KiDumpTrapFrame(TrapFrame);
ASSERT(FALSE);
while (TRUE);
ERROR_FATAL();
while (TRUE); /* 'noreturn' function */
}
VOID

View file

@ -229,7 +229,7 @@ HalHandleNMI(IN PVOID NmiInfo)
//
// Don't recurse
//
if (HalpNMIInProgress++) ASSERT(FALSE); // while (TRUE);
if (HalpNMIInProgress++) ERROR_DBGBREAK();
//
// Read the system control register B

View file

@ -181,8 +181,7 @@ KeTryToAcquireQueuedSpinLockRaiseToSynch(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber,
IN PKIRQL OldIrql)
{
#ifdef CONFIG_SMP
ASSERT(FALSE); // FIXME: Unused
// while (TRUE);
ERROR_DBGBREAK("FIXME: Unused\n"); // FIXME: Unused
return FALSE;
#endif
@ -206,8 +205,7 @@ KeTryToAcquireQueuedSpinLock(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber,
OUT PKIRQL OldIrql)
{
#ifdef CONFIG_SMP
ASSERT(FALSE); // FIXME: Unused
// while (TRUE);
ERROR_DBGBREAK("FIXME: Unused\n"); // FIXME: Unused
return FALSE;
#endif

View file

@ -25,8 +25,7 @@ HalpcGetCmosData(IN PBUS_HANDLER BusHandler,
IN ULONG Offset,
IN ULONG Length)
{
DPRINT1("CMOS GetData\n");
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK("CMOS GetData\n");
return 0;
}
@ -39,8 +38,7 @@ HalpcSetCmosData(IN PBUS_HANDLER BusHandler,
IN ULONG Offset,
IN ULONG Length)
{
DPRINT1("CMOS SetData\n");
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK("CMOS SetData\n");
return 0;
}

View file

@ -536,8 +536,7 @@ HalpPCIPin2ISALine(IN PBUS_HANDLER BusHandler,
IN PCI_SLOT_NUMBER SlotNumber,
IN PPCI_COMMON_CONFIG PciData)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
}
VOID
@ -548,8 +547,7 @@ HalpPCIISALine2Pin(IN PBUS_HANDLER BusHandler,
IN PPCI_COMMON_CONFIG PciNewData,
IN PPCI_COMMON_CONFIG PciOldData)
{
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK();
}
NTSTATUS
@ -641,10 +639,8 @@ HalpRegisterPciDebuggingDeviceInfo(VOID)
if (!Found) return;
/* FIXME: TODO */
DPRINT1("You have implemented the KD routines for searching PCI debugger"
"devices, but you have forgotten to implement this routine\n");
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK("You have implemented the KD routines for searching PCI debugger"
"devices, but you have forgotten to implement this routine\n");
}
static ULONG NTAPI
@ -678,8 +674,7 @@ HalpAdjustPCIResourceList(IN PBUS_HANDLER BusHandler,
if (HalpPciLockSettings)
{
/* /PCILOCK is not yet supported */
UNIMPLEMENTED;
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK("/PCILOCK boot switch is not yet supported.");
}
#endif
/* Now create the correct resource list based on the supported bus ranges */

View file

@ -811,8 +811,7 @@ NTAPI
HalpDispatchWmi(IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
DPRINT1("HAL: PnP Driver WMI!\n");
ASSERT(FALSE); // while (TRUE);
UNIMPLEMENTED_DBGBREAK("HAL: PnP Driver WMI!\n");
return STATUS_SUCCESS;
}

View file

@ -15,7 +15,7 @@
#ifndef __INTERNAL_DEBUG
#define __INTERNAL_DEBUG
/* Define DbgPrint/DbgPrintEx/RtlAssert/RtlRaiseStatus unless the NDK is used */
/* Define DbgPrint/DbgPrintEx/RtlAssert unless the NDK is used */
#if !defined(_RTLFUNCS_H) && !defined(_NTDDK_)
/* Make sure we have basic types (some people include us *before* SDK)... */
@ -51,31 +51,8 @@ RtlAssert(
PCHAR Message
);
/*
* This is the definition of NTSTATUS, but renamed
* in order not to conflict with other ones.
*/
typedef _Return_type_success_(return >= 0) LONG DEBUG_NTSTATUS;
__analysis_noreturn
NTSYSAPI
VOID
NTAPI
RtlRaiseStatus(
_In_ DEBUG_NTSTATUS Status
);
#endif /* !defined(_RTLFUNCS_H) && !defined(_NTDDK_) */
/* Fix usage of RtlRaiseStatus */
#if !defined(_RTLFUNCS_H) && defined(_NTDDK_)
#define RaiseStatus ExRaiseStatus
#else
#define RaiseStatus RtlRaiseStatus
#endif /* !defined(_RTLFUNCS_H) && defined(_NTDDK_) */
#ifndef assert
#ifndef NASSERT
#define assert(x) if (!(x)) { RtlAssert((PVOID)#x, (PVOID)__FILE__, __LINE__, ""); }
@ -160,6 +137,37 @@ RtlRaiseStatus(
#endif /* not DBG */
/******************************************************************************/
/*
* Declare a target-dependent process termination procedure.
*/
#ifndef _NTDDK_ /* User-Mode */
#ifndef NTOS_MODE_USER /* Should be Win32 */
#ifndef _WIN32
#error "Unsupported target."
#else
#define TerminateCurrentProcess(Status) TerminateProcess(GetCurrentProcess(), (Status))
#endif
#else /* Native */
#ifndef _PSFUNCS_H
NTSYSCALLAPI
NTSTATUS
NTAPI
NtTerminateProcess(
IN HANDLE ProcessHandle,
IN NTSTATUS ExitStatus
);
#endif
#ifndef NtCurrentProcess
#define NtCurrentProcess() ((HANDLE)(LONG_PTR)-1)
#endif
#define TerminateCurrentProcess(Status) NtTerminateProcess(NtCurrentProcess(), (Status))
#endif
#else /* Kernel-Mode */
#include <bugcodes.h>
#define TerminateCurrentProcess(Status) KeBugCheckEx(CRITICAL_SERVICE_FAILED, (Status), 0, 0, 0)
#endif
/* For internal purposes only */
#define __ERROR_DBGBREAK(...) \
do { \
@ -168,10 +176,11 @@ do { \
} while (0)
/* For internal purposes only */
#define __ERROR_FATAL(Status, ...) \
do { \
DbgPrint("" __VA_ARGS__); \
RaiseStatus((Status)); \
#define __ERROR_FATAL(Status, ...) \
do { \
DbgPrint("" __VA_ARGS__); \
DbgBreakPoint(); \
TerminateCurrentProcess(Status); \
} while (0)
/*