Author: hbelusca Date: Thu Jan 10 01:45:22 2013 New Revision: 58154
URL: http://svn.reactos.org/svn/reactos?rev=58154&view=rev Log: [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
Modified: trunk/reactos/drivers/bus/pcix/device.c trunk/reactos/drivers/bus/pcix/enum.c trunk/reactos/drivers/bus/pcix/fdo.c trunk/reactos/drivers/bus/pcix/init.c trunk/reactos/drivers/bus/pcix/intrface/agpintrf.c trunk/reactos/drivers/bus/pcix/intrface/busintrf.c trunk/reactos/drivers/bus/pcix/intrface/cardbus.c trunk/reactos/drivers/bus/pcix/intrface/devhere.c trunk/reactos/drivers/bus/pcix/intrface/lddintrf.c trunk/reactos/drivers/bus/pcix/intrface/locintrf.c trunk/reactos/drivers/bus/pcix/intrface/pmeintf.c trunk/reactos/drivers/bus/pcix/intrface/routintf.c trunk/reactos/drivers/bus/pcix/pci/config.c trunk/reactos/drivers/bus/pcix/pci/ppbridge.c trunk/reactos/drivers/bus/pcix/pcivrify.c trunk/reactos/drivers/bus/pcix/pdo.c trunk/reactos/drivers/bus/pcix/power.c trunk/reactos/drivers/bus/pcix/utils.c trunk/reactos/hal/halx86/acpi/halpnpdd.c trunk/reactos/hal/halx86/generic/bios.c trunk/reactos/hal/halx86/generic/misc.c trunk/reactos/hal/halx86/generic/spinlock.c trunk/reactos/hal/halx86/legacy/bus/cmosbus.c trunk/reactos/hal/halx86/legacy/bus/pcibus.c trunk/reactos/hal/halx86/legacy/halpnpdd.c trunk/reactos/include/reactos/debug.h
Modified: trunk/reactos/drivers/bus/pcix/device.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pcix/device.c?r... ============================================================================== --- trunk/reactos/drivers/bus/pcix/device.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/pcix/device.c [iso-8859-1] Thu Jan 10 01:45:22 2013 @@ -261,8 +261,7 @@ IN PIO_RESOURCE_DESCRIPTOR IoDescriptor) { /* Not yet implemented */ - UNIMPLEMENTED; - ASSERT(FALSE); // while (TRUE); + UNIMPLEMENTED_DBGBREAK(); }
VOID @@ -271,8 +270,7 @@ IN PPCI_COMMON_HEADER PciData) { /* Not yet implemented */ - UNIMPLEMENTED; - ASSERT(FALSE); // while (TRUE); + UNIMPLEMENTED_DBGBREAK(); }
VOID @@ -281,8 +279,7 @@ IN PPCI_COMMON_HEADER PciData) { /* Not yet implemented */ - UNIMPLEMENTED; - ASSERT(FALSE); // while (TRUE); + UNIMPLEMENTED_DBGBREAK(); }
/* EOF */
Modified: trunk/reactos/drivers/bus/pcix/enum.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pcix/enum.c?rev... ============================================================================== --- trunk/reactos/drivers/bus/pcix/enum.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/pcix/enum.c [iso-8859-1] Thu Jan 10 01:45:22 2013 @@ -147,14 +147,12 @@ { /* 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 @@ IN OUT PDEVICE_RELATIONS *pDeviceRelations) { /* Not yet implemented */ - UNIMPLEMENTED; - ASSERT(FALSE); // while (TRUE); + UNIMPLEMENTED_DBGBREAK(); return STATUS_NOT_IMPLEMENTED; }
@@ -599,8 +596,7 @@ (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 @@ 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 @@ (PdoExtension->Dependent.type1.IsaBitSet))) { /* We'll need to do some legacy support */ - UNIMPLEMENTED; - ASSERT(FALSE); // while (TRUE); + UNIMPLEMENTED_DBGBREAK(); } } else @@ -1547,8 +1541,7 @@ 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 @@ if (PciAssignBusNumbers) { /* Not yet supported */ - UNIMPLEMENTED; - ASSERT(FALSE); // while (TRUE); + UNIMPLEMENTED_DBGBREAK(); } }
@@ -1605,9 +1597,7 @@ 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 @@ 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 @@ 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 @@ (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 */
Modified: trunk/reactos/drivers/bus/pcix/fdo.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pcix/fdo.c?rev=... ============================================================================== --- trunk/reactos/drivers/bus/pcix/fdo.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/pcix/fdo.c [iso-8859-1] Thu Jan 10 01:45:22 2013 @@ -93,8 +93,7 @@ { /* 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 @@ { /* 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 {
Modified: trunk/reactos/drivers/bus/pcix/init.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pcix/init.c?rev... ============================================================================== --- trunk/reactos/drivers/bus/pcix/init.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/pcix/init.c [iso-8859-1] Thu Jan 10 01:45:22 2013 @@ -678,8 +678,7 @@ PciGetDebugPorts(IN HANDLE DebugKey) { /* This function is not yet implemented */ - UNIMPLEMENTED; - ASSERT(FALSE); // while (TRUE); + UNIMPLEMENTED_DBGBREAK(); return STATUS_SUCCESS; }
@@ -688,9 +687,7 @@ 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
Modified: trunk/reactos/drivers/bus/pcix/intrface/agpintrf.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pcix/intrface/a... ============================================================================== --- trunk/reactos/drivers/bus/pcix/intrface/agpintrf.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/pcix/intrface/agpintrf.c [iso-8859-1] Thu Jan 10 01:45:22 2013 @@ -58,8 +58,7 @@ }
/* Not yet implemented */ - UNIMPLEMENTED; - ASSERT(FALSE); // while (TRUE); + UNIMPLEMENTED_DBGBREAK(); return STATUS_NOT_IMPLEMENTED; }
Modified: trunk/reactos/drivers/bus/pcix/intrface/busintrf.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pcix/intrface/b... ============================================================================== --- trunk/reactos/drivers/bus/pcix/intrface/busintrf.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/pcix/intrface/busintrf.c [iso-8859-1] Thu Jan 10 01:45:22 2013 @@ -48,8 +48,7 @@ IN PINTERFACE Interface) { /* Not yet implemented */ - UNIMPLEMENTED; - ASSERT(FALSE); // while (TRUE); + UNIMPLEMENTED_DBGBREAK(); return STATUS_NOT_IMPLEMENTED; }
Modified: trunk/reactos/drivers/bus/pcix/intrface/cardbus.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pcix/intrface/c... ============================================================================== --- trunk/reactos/drivers/bus/pcix/intrface/cardbus.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/pcix/intrface/cardbus.c [iso-8859-1] Thu Jan 10 01:45:22 2013 @@ -33,32 +33,28 @@ 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 @@ IN PPCI_COMMON_HEADER PciData, IN PIO_RESOURCE_DESCRIPTOR IoDescriptor) { - UNIMPLEMENTED; - ASSERT(FALSE); // while (TRUE); + UNIMPLEMENTED_DBGBREAK(); }
VOID @@ -76,8 +71,7 @@ Cardbus_ResetDevice(IN PPCI_PDO_EXTENSION PdoExtension, IN PPCI_COMMON_HEADER PciData) { - UNIMPLEMENTED; - ASSERT(FALSE); // while (TRUE); + UNIMPLEMENTED_DBGBREAK(); }
VOID @@ -85,8 +79,7 @@ Cardbus_ChangeResourceSettings(IN PPCI_PDO_EXTENSION PdoExtension, IN PPCI_COMMON_HEADER PciData) { - UNIMPLEMENTED; - ASSERT(FALSE); // while (TRUE); + UNIMPLEMENTED_DBGBREAK(); }
NTSTATUS @@ -108,8 +101,7 @@ IN PINTERFACE Interface) { /* Not yet implemented */ - UNIMPLEMENTED; - ASSERT(FALSE); // while (TRUE); + UNIMPLEMENTED_DBGBREAK(); return STATUS_NOT_IMPLEMENTED; }
Modified: trunk/reactos/drivers/bus/pcix/intrface/devhere.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pcix/intrface/d... ============================================================================== --- trunk/reactos/drivers/bus/pcix/intrface/devhere.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/pcix/intrface/devhere.c [iso-8859-1] Thu Jan 10 01:45:22 2013 @@ -50,8 +50,7 @@ PAGED_CODE();
/* Not yet implemented */ - UNIMPLEMENTED; - ASSERT(FALSE); // while (TRUE); + UNIMPLEMENTED_DBGBREAK(); return STATUS_NOT_IMPLEMENTED; }
Modified: trunk/reactos/drivers/bus/pcix/intrface/lddintrf.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pcix/intrface/l... ============================================================================== --- trunk/reactos/drivers/bus/pcix/intrface/lddintrf.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/pcix/intrface/lddintrf.c [iso-8859-1] Thu Jan 10 01:45:22 2013 @@ -48,8 +48,7 @@ IN PINTERFACE Interface) { /* Not yet implemented */ - UNIMPLEMENTED; - ASSERT(FALSE); // while (TRUE); + UNIMPLEMENTED_DBGBREAK(); return STATUS_NOT_IMPLEMENTED; }
Modified: trunk/reactos/drivers/bus/pcix/intrface/locintrf.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pcix/intrface/l... ============================================================================== --- trunk/reactos/drivers/bus/pcix/intrface/locintrf.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/pcix/intrface/locintrf.c [iso-8859-1] Thu Jan 10 01:45:22 2013 @@ -48,8 +48,7 @@ IN PINTERFACE Interface) { /* Not yet implemented */ - UNIMPLEMENTED; - ASSERT(FALSE); // while (TRUE); + UNIMPLEMENTED_DBGBREAK(); return STATUS_NOT_IMPLEMENTED; }
Modified: trunk/reactos/drivers/bus/pcix/intrface/pmeintf.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pcix/intrface/p... ============================================================================== --- trunk/reactos/drivers/bus/pcix/intrface/pmeintf.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/pcix/intrface/pmeintf.c [iso-8859-1] Thu Jan 10 01:45:22 2013 @@ -51,8 +51,7 @@ if (Version != PCI_PME_INTRF_STANDARD_VER) return STATUS_NOINTERFACE;
/* Not yet implemented */ - UNIMPLEMENTED; - ASSERT(FALSE); // while (TRUE); + UNIMPLEMENTED_DBGBREAK(); return STATUS_NOT_IMPLEMENTED; }
Modified: trunk/reactos/drivers/bus/pcix/intrface/routintf.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pcix/intrface/r... ============================================================================== --- trunk/reactos/drivers/bus/pcix/intrface/routintf.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/pcix/intrface/routintf.c [iso-8859-1] Thu Jan 10 01:45:22 2013 @@ -53,8 +53,7 @@ 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; }
Modified: trunk/reactos/drivers/bus/pcix/pci/config.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pcix/pci/config... ============================================================================== --- trunk/reactos/drivers/bus/pcix/pci/config.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/pcix/pci/config.c [iso-8859-1] Thu Jan 10 01:45:22 2013 @@ -65,8 +65,7 @@ if (PciInterface) { /* Currently this driver only supports the legacy HAL interface */ - UNIMPLEMENTED; - ASSERT(FALSE); // while (TRUE); + UNIMPLEMENTED_DBGBREAK(); } else {
Modified: trunk/reactos/drivers/bus/pcix/pci/ppbridge.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pcix/pci/ppbrid... ============================================================================== --- trunk/reactos/drivers/bus/pcix/pci/ppbridge.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/pcix/pci/ppbridge.c [iso-8859-1] Thu Jan 10 01:45:22 2013 @@ -671,8 +671,7 @@ PPBridge_ResetDevice(IN PPCI_PDO_EXTENSION PdoExtension, IN PPCI_COMMON_HEADER PciData) { - UNIMPLEMENTED; - ASSERT(FALSE); // while (TRUE); + UNIMPLEMENTED_DBGBREAK(); }
VOID
Modified: trunk/reactos/drivers/bus/pcix/pcivrify.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pcix/pcivrify.c... ============================================================================== --- trunk/reactos/drivers/bus/pcix/pcivrify.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/pcix/pcivrify.c [iso-8859-1] Thu Jan 10 01:45:22 2013 @@ -79,8 +79,7 @@ IN PVOID Context) { /* This function is not yet implemented */ - UNIMPLEMENTED; - ASSERT(FALSE); // while (TRUE); + UNIMPLEMENTED_DBGBREAK(); return STATUS_SUCCESS; }
Modified: trunk/reactos/drivers/bus/pcix/pdo.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pcix/pdo.c?rev=... ============================================================================== --- trunk/reactos/drivers/bus/pcix/pdo.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/pcix/pdo.c [iso-8859-1] Thu Jan 10 01:45:22 2013 @@ -79,8 +79,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension) { - UNIMPLEMENTED; - ASSERT(FALSE); // while (TRUE); + UNIMPLEMENTED_DBGBREAK(); return STATUS_NOT_SUPPORTED; }
Modified: trunk/reactos/drivers/bus/pcix/power.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pcix/power.c?re... ============================================================================== --- trunk/reactos/drivers/bus/pcix/power.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/pcix/power.c [iso-8859-1] Thu Jan 10 01:45:22 2013 @@ -191,8 +191,7 @@ if (DeviceState < DeviceExtension->PowerState.CurrentDeviceState) { /* We would normally re-assign resources after powerup */ - UNIMPLEMENTED; - ASSERT(FALSE); // while (TRUE); + UNIMPLEMENTED_DBGBREAK(); Status = STATUS_NOT_IMPLEMENTED; } }
Modified: trunk/reactos/drivers/bus/pcix/utils.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pcix/utils.c?re... ============================================================================== --- trunk/reactos/drivers/bus/pcix/utils.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/pcix/utils.c [iso-8859-1] Thu Jan 10 01:45:22 2013 @@ -152,8 +152,7 @@ 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 @@ if (!PciDebugPortsCount) return FALSE;
/* eVb has not been able to test such devices yet */ - UNIMPLEMENTED; - ASSERT(FALSE); // while (TRUE); + UNIMPLEMENTED_DBGBREAK(); return FALSE; }
Modified: trunk/reactos/hal/halx86/acpi/halpnpdd.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/acpi/halpnpdd.c?... ============================================================================== --- trunk/reactos/hal/halx86/acpi/halpnpdd.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/acpi/halpnpdd.c [iso-8859-1] Thu Jan 10 01:45:22 2013 @@ -813,8 +813,7 @@ 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; }
Modified: trunk/reactos/hal/halx86/generic/bios.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/bios.c?r... ============================================================================== --- trunk/reactos/hal/halx86/generic/bios.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/generic/bios.c [iso-8859-1] Thu Jan 10 01:45:22 2013 @@ -217,8 +217,8 @@ DPRINT1("HAL: Trap0D while not in V86 mode\n"); KiDumpTrapFrame(TrapFrame);
- ASSERT(FALSE); - while (TRUE); + ERROR_FATAL(); + while (TRUE); /* 'noreturn' function */ }
VOID
Modified: trunk/reactos/hal/halx86/generic/misc.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/misc.c?r... ============================================================================== --- trunk/reactos/hal/halx86/generic/misc.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/generic/misc.c [iso-8859-1] Thu Jan 10 01:45:22 2013 @@ -229,7 +229,7 @@ // // Don't recurse // - if (HalpNMIInProgress++) ASSERT(FALSE); // while (TRUE); + if (HalpNMIInProgress++) ERROR_DBGBREAK();
// // Read the system control register B
Modified: trunk/reactos/hal/halx86/generic/spinlock.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/spinlock... ============================================================================== --- trunk/reactos/hal/halx86/generic/spinlock.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/generic/spinlock.c [iso-8859-1] Thu Jan 10 01:45:22 2013 @@ -181,8 +181,7 @@ 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 @@ OUT PKIRQL OldIrql) { #ifdef CONFIG_SMP - ASSERT(FALSE); // FIXME: Unused - // while (TRUE); + ERROR_DBGBREAK("FIXME: Unused\n"); // FIXME: Unused return FALSE; #endif
Modified: trunk/reactos/hal/halx86/legacy/bus/cmosbus.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/legacy/bus/cmosb... ============================================================================== --- trunk/reactos/hal/halx86/legacy/bus/cmosbus.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/legacy/bus/cmosbus.c [iso-8859-1] Thu Jan 10 01:45:22 2013 @@ -25,8 +25,7 @@ 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 @@ IN ULONG Offset, IN ULONG Length) { - DPRINT1("CMOS SetData\n"); - ASSERT(FALSE); // while (TRUE); + UNIMPLEMENTED_DBGBREAK("CMOS SetData\n"); return 0; }
Modified: trunk/reactos/hal/halx86/legacy/bus/pcibus.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/legacy/bus/pcibu... ============================================================================== --- trunk/reactos/hal/halx86/legacy/bus/pcibus.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/legacy/bus/pcibus.c [iso-8859-1] Thu Jan 10 01:45:22 2013 @@ -536,8 +536,7 @@ IN PCI_SLOT_NUMBER SlotNumber, IN PPCI_COMMON_CONFIG PciData) { - UNIMPLEMENTED; - ASSERT(FALSE); // while (TRUE); + UNIMPLEMENTED_DBGBREAK(); }
VOID @@ -548,8 +547,7 @@ IN PPCI_COMMON_CONFIG PciNewData, IN PPCI_COMMON_CONFIG PciOldData) { - UNIMPLEMENTED; - ASSERT(FALSE); // while (TRUE); + UNIMPLEMENTED_DBGBREAK(); }
NTSTATUS @@ -641,10 +639,8 @@ 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 @@ 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 */
Modified: trunk/reactos/hal/halx86/legacy/halpnpdd.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/legacy/halpnpdd.... ============================================================================== --- trunk/reactos/hal/halx86/legacy/halpnpdd.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/legacy/halpnpdd.c [iso-8859-1] Thu Jan 10 01:45:22 2013 @@ -811,8 +811,7 @@ 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; }
Modified: trunk/reactos/include/reactos/debug.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/debug.h?rev... ============================================================================== --- trunk/reactos/include/reactos/debug.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/debug.h [iso-8859-1] Thu Jan 10 01:45:22 2013 @@ -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,30 +51,7 @@ 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 @@ -160,6 +137,37 @@ #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 @@ } 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)
/*