mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Print out the contents of the non-paged pool on SysRq+'A'
Bug fixes svn path=/trunk/; revision=1671
This commit is contained in:
parent
f665b3f2f4
commit
3073e95ed9
10 changed files with 97 additions and 27 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: create.c,v 1.20 2001/03/06 23:31:44 cnettel Exp $
|
||||
/* $Id: create.c,v 1.21 2001/03/07 08:57:09 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -674,7 +674,7 @@ VfatCreateFile (PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
|||
{
|
||||
Irp->IoStatus.Information = 0;
|
||||
Irp->IoStatus.Status = STATUS_OBJECT_NAME_INVALID;
|
||||
return(Status);
|
||||
return(STATUS_OBJECT_NAME_INVALID);
|
||||
}
|
||||
c++;
|
||||
}
|
||||
|
|
|
@ -108,6 +108,12 @@ static const BYTE asciiTable4[37]=
|
|||
'{', '|', '}', '"'
|
||||
};
|
||||
|
||||
VOID STDCALL
|
||||
KdSystemDebugControl(ULONG Code);
|
||||
|
||||
static LONG DoSystemDebug = -1;
|
||||
static BOOLEAN InSysRq = FALSE;
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
static void KbdWrite(int addr,BYTE data)
|
||||
|
@ -409,6 +415,13 @@ static VOID KbdDpcRoutine(PKDPC Dpc,
|
|||
PIRP Irp = (PIRP)SystemArgument2;
|
||||
PDEVICE_OBJECT DeviceObject = (PDEVICE_OBJECT)SystemArgument1;
|
||||
|
||||
if (SystemArgument1 == NULL && DoSystemDebug != -1)
|
||||
{
|
||||
KdSystemDebugControl(DoSystemDebug);
|
||||
DoSystemDebug = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
CHECKPOINT;
|
||||
DPRINT("KbdDpcRoutine(DeviceObject %x, Irp %x)\n",
|
||||
DeviceObject,Irp);
|
||||
|
@ -474,9 +487,20 @@ static BOOLEAN KeyboardHandler(PKINTERRUPT Interrupt, PVOID Context)
|
|||
|
||||
// DbgPrint("Key: %c\n",VirtualToAscii(ScanToVirtual(thisKey),isDown));
|
||||
// DbgPrint("Key: %x\n",ScanToVirtual(thisKey));
|
||||
if (ScanToVirtual(thisKey)==0x2a)
|
||||
if (ScanToVirtual(thisKey) == VK_PRINT && isDown)
|
||||
{
|
||||
KeBugCheck(0);
|
||||
InSysRq = TRUE;
|
||||
}
|
||||
else if (ScanToVirtual(thisKey) == VK_PRINT && !isDown)
|
||||
{
|
||||
InSysRq = FALSE;
|
||||
}
|
||||
else if (InSysRq == TRUE && ScanToVirtual(thisKey) >= VK_A &&
|
||||
ScanToVirtual(thisKey) <= VK_Z && isDown)
|
||||
{
|
||||
DoSystemDebug = ScanToVirtual(thisKey) - VK_A;
|
||||
KeInsertQueueDpc(&KbdDpc, NULL, NULL);
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
if (CurrentIrp!=NULL)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: Makefile,v 1.12 2001/03/06 17:28:25 dwelch Exp $
|
||||
# $Id: Makefile,v 1.13 2001/03/07 08:57:08 dwelch Exp $
|
||||
#
|
||||
# ReactOS Operating System
|
||||
#
|
||||
|
@ -289,6 +289,7 @@ C_OBJECTS = $(OBJECTS_NT) $(OBJECTS_HAL) $(OBJECTS_MM) $(OBJECTS_MM_I386) \
|
|||
$(OBJECTS_PO) $(OBJECTS_KD)
|
||||
|
||||
D_FILES := $(filter-out ex/napi.%, $(filter-out nt/zw.%, $(C_OBJECTS:.o=.d)))
|
||||
D1_FILES := $(join $(dir $(D_FILES)), $(addprefix ., $(notdir $(D_FILES))))
|
||||
|
||||
# Resources
|
||||
OBJECTS_RESOURCE = \
|
||||
|
@ -453,13 +454,13 @@ CLEAN_FILES = $(OBJECTS_PATH)\*.o cc\*.o cm\*.o dbg\*.o ex\*.o hal\x86\*.o io\*.
|
|||
ke\*.o ldr\*.o mm\*.o nt\*.o ob\*.o ps\*.o rtl\*.o se\*.o \
|
||||
ke\i386\*.o mm\i386\*.o fs\*.o po\*.o nls\*.o lpc\*.o \
|
||||
kd\*.o $(TARGETNAME).o $(TARGETNAME).a junk.tmp base.tmp temp.exp \
|
||||
$(TARGETNAME).exe $(TARGETNAME).nostrip.exe $(TARGETNAME).sym $(TARGETNAME).coff $(join $(dir $(D_FILES)), $(addprefix ., $(notdir $(D_FILES))))
|
||||
$(TARGETNAME).exe $(TARGETNAME).nostrip.exe $(TARGETNAME).sym $(TARGETNAME).coff $(D1_FILES)
|
||||
else
|
||||
CLEAN_FILES = $(OBJECTS_PATH)/*.o cc/*.o cm/*.o dbg/*.o ex/*.o hal/x86/*.o io/*.o \
|
||||
ke/*.o ldr/*.o mm/*.o nt/*.o ob/*.o ps/*.o rtl/*.o se/*.o \
|
||||
ke/i386/*.o mm/i386/*.o fs/*.o po/*.o nls/*.o lpc/*.o \
|
||||
kd/*.o $(TARGETNAME).o $(TARGETNAME).a junk.tmp base.tmp temp.exp \
|
||||
$(TARGETNAME).exe $(TARGETNAME).nostrip.exe $(TARGETNAME).sym $(TARGETNAME).coff $(join $(dir $(D_FILES)), $(addprefix ., $(notdir $(D_FILES))))
|
||||
$(TARGETNAME).exe $(TARGETNAME).nostrip.exe $(TARGETNAME).sym $(TARGETNAME).coff $(D1_FILES)
|
||||
endif
|
||||
|
||||
|
||||
|
@ -572,7 +573,7 @@ ex/napi.o: ex/napi.c ../include/ntdll/napi.h
|
|||
|
||||
ke/main.o: ke/main.c ../include/reactos/buildno.h
|
||||
|
||||
#include $(join $(dir $(D_FILES)), $(addprefix ., $(notdir $(D_FILES))))
|
||||
include $(D1_FILES)
|
||||
|
||||
.%.d: %.c
|
||||
$(CC) $(CFLAGS) -M $< | sed -e 's#$(*F).o#$(@D)/&#g' | sed -e 's@ /[^ ]*@@g' -e 's@^\(.*\)\.o:@.\1.d \1.o:@' > $@
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: kdebug.c,v 1.19 2001/02/14 02:53:53 dwelch Exp $
|
||||
/* $Id: kdebug.c,v 1.20 2001/03/07 08:57:08 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -12,7 +12,7 @@
|
|||
#include <ddk/ntddk.h>
|
||||
#include <internal/ntoskrnl.h>
|
||||
#include <internal/kd.h>
|
||||
|
||||
#include <internal/mm.h>
|
||||
|
||||
/* serial debug connection */
|
||||
#define DEFAULT_DEBUG_PORT 2 /* COM2 */
|
||||
|
@ -337,4 +337,17 @@ KeEnterKernelDebugger (VOID)
|
|||
#endif
|
||||
}
|
||||
|
||||
VOID STDCALL
|
||||
KdSystemDebugControl(ULONG Code)
|
||||
{
|
||||
if (Code == 0)
|
||||
{
|
||||
MiDebugDumpNonPagedPool();
|
||||
}
|
||||
if (Code == 1)
|
||||
{
|
||||
KeBugCheck(0);
|
||||
}
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: bug.c,v 1.14 2000/08/12 19:33:21 dwelch Exp $
|
||||
/* $Id: bug.c,v 1.15 2001/03/07 08:57:08 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -14,6 +14,7 @@
|
|||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/ke.h>
|
||||
#include <internal/ps.h>
|
||||
|
||||
#include <internal/debug.h>
|
||||
|
||||
|
@ -78,12 +79,26 @@ KeBugCheckEx (
|
|||
DbgPrint("Bug detected (code %x param %x %x %x %x)\n",BugCheckCode,
|
||||
BugCheckParameter1,BugCheckParameter2,BugCheckParameter3,
|
||||
BugCheckParameter4);
|
||||
if (PsGetCurrentProcess() != NULL)
|
||||
{
|
||||
DbgPrint("Pid: %x <", PsGetCurrentProcess()->UniqueProcessId);
|
||||
DbgPrint("%.8s> ", PsGetCurrentProcess()->ImageFileName);
|
||||
}
|
||||
if (PsGetCurrentThread() != NULL)
|
||||
{
|
||||
DbgPrint("Thrd: %x Tid: %x\n",
|
||||
PsGetCurrentThread(),
|
||||
PsGetCurrentThread()->Cid.UniqueThread);
|
||||
}
|
||||
// PsDumpThreads();
|
||||
KeDumpStackFrames(&((&BugCheckCode)[-1]),64);
|
||||
|
||||
#if 1
|
||||
for(;;)
|
||||
__asm__("hlt\n\t"); //PJS: use HLT instruction, rather than busy wait
|
||||
{
|
||||
/* PJS: use HLT instruction, rather than busy wait */
|
||||
__asm__("hlt\n\t");
|
||||
}
|
||||
#else
|
||||
for(;;);
|
||||
#endif
|
||||
|
@ -107,6 +122,17 @@ KeBugCheck (ULONG BugCheckCode)
|
|||
for(;;);
|
||||
}
|
||||
InBugCheck = 1;
|
||||
if (PsGetCurrentProcess() != NULL)
|
||||
{
|
||||
DbgPrint("Pid: %x <", PsGetCurrentProcess()->UniqueProcessId);
|
||||
DbgPrint("%.8s> ", PsGetCurrentProcess()->ImageFileName);
|
||||
}
|
||||
if (PsGetCurrentThread() != NULL)
|
||||
{
|
||||
DbgPrint("Thrd: %x Tid: %x\n",
|
||||
PsGetCurrentThread(),
|
||||
PsGetCurrentThread()->Cid.UniqueThread);
|
||||
}
|
||||
// PsDumpThreads();
|
||||
KeDumpStackFrames(&((&BugCheckCode)[-1]), 80);
|
||||
#if 1
|
||||
|
|
|
@ -64,15 +64,15 @@ MEMORY_AREA* MmOpenMemoryAreaByAddress(PMADDRESS_SPACE AddressSpace,
|
|||
assert(current_entry->Blink->Flink == current_entry);
|
||||
if (current_entry->Flink->Blink != current_entry)
|
||||
{
|
||||
DPRINT("BaseAddress %x\n", current->BaseAddress);
|
||||
DPRINT("current_entry->Flink %x ", current_entry->Flink);
|
||||
DPRINT("¤t_entry->Flink %x\n",
|
||||
DPRINT1("BaseAddress %x\n", current->BaseAddress);
|
||||
DPRINT1("current_entry->Flink %x ", current_entry->Flink);
|
||||
DPRINT1("¤t_entry->Flink %x\n",
|
||||
¤t_entry->Flink);
|
||||
DPRINT("current_entry->Flink->Blink %x\n",
|
||||
DPRINT1("current_entry->Flink->Blink %x\n",
|
||||
current_entry->Flink->Blink);
|
||||
DPRINT("¤t_entry->Flink->Blink %x\n",
|
||||
DPRINT1("¤t_entry->Flink->Blink %x\n",
|
||||
¤t_entry->Flink->Blink);
|
||||
DPRINT("¤t_entry->Flink %x\n",
|
||||
DPRINT1("¤t_entry->Flink %x\n",
|
||||
¤t_entry->Flink);
|
||||
}
|
||||
assert(current_entry->Flink->Blink == current_entry);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: npool.c,v 1.34 2001/03/06 14:41:18 dwelch Exp $
|
||||
/* $Id: npool.c,v 1.35 2001/03/07 08:57:08 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -98,10 +98,13 @@ MiDebugDumpNonPagedPool(VOID)
|
|||
KeAcquireSpinLock(&MmNpoolLock, &oldIrql);
|
||||
|
||||
DbgPrint("******* Dumping non paging pool contents ******\n");
|
||||
while (current!=NULL)
|
||||
while (current != NULL)
|
||||
{
|
||||
DPRINT("Size 0x%x Tag 0x%x Allocator 0x%x\n",
|
||||
current->size, current->Tag, current->Caller);
|
||||
DbgPrint("Size 0x%x Tag 0x%x (%c%c%c%c) Allocator 0x%x\n",
|
||||
current->size, current->Tag,
|
||||
current->Tag >> 24, (current->Tag >> 16) & 0xFF,
|
||||
(current->Tag >> 8) & 0xFF, current->Tag & 0xFF,
|
||||
current->Caller);
|
||||
|
||||
current=current->next;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: pool.c,v 1.11 2001/03/06 14:41:18 dwelch Exp $
|
||||
/* $Id: pool.c,v 1.12 2001/03/07 08:57:09 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -51,7 +51,9 @@ EiAllocatePool(POOL_TYPE PoolType,
|
|||
|
||||
case PagedPool:
|
||||
case PagedPoolCacheAligned:
|
||||
Block = ExAllocatePagedPoolWithTag(PoolType,NumberOfBytes,Tag);
|
||||
// Block = ExAllocatePagedPoolWithTag(PoolType,NumberOfBytes,Tag);
|
||||
Block = ExAllocateNonPagedPoolWithTag(PoolType, NumberOfBytes,
|
||||
Tag, Caller);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
; $Id: ntoskrnl.def,v 1.99 2001/03/01 15:36:34 ekohl Exp $
|
||||
; $Id: ntoskrnl.def,v 1.100 2001/03/07 08:57:08 dwelch Exp $
|
||||
;
|
||||
; reactos/ntoskrnl/ntoskrnl.def
|
||||
;
|
||||
|
@ -1105,4 +1105,4 @@ WRITE_PORT_BUFFER_USHORT@12
|
|||
WRITE_PORT_UCHAR@8
|
||||
WRITE_PORT_ULONG@8
|
||||
WRITE_PORT_USHORT@8
|
||||
|
||||
KdSystemDebugControl@4
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
; $Id: ntoskrnl.edf,v 1.86 2001/03/01 15:36:34 ekohl Exp $
|
||||
; $Id: ntoskrnl.edf,v 1.87 2001/03/07 08:57:08 dwelch Exp $
|
||||
;
|
||||
; reactos/ntoskrnl/ntoskrnl.def
|
||||
;
|
||||
|
@ -1104,3 +1104,4 @@ WRITE_PORT_BUFFER_USHORT=WRITE_PORT_BUFFER_USHORT@12
|
|||
WRITE_PORT_UCHAR=WRITE_PORT_UCHAR@8
|
||||
WRITE_PORT_ULONG=WRITE_PORT_ULONG@8
|
||||
WRITE_PORT_USHORT=WRITE_PORT_USHORT@8
|
||||
KdSystemDebugControl = KdSystemDebugControl@4
|
Loading…
Reference in a new issue