Fix KDBG and enable IRP_NOCACHE for ReadFile. Also disable SEH for Buffer since PRobeForWrite has a bug and cannot probe past a page

svn path=/trunk/; revision=15163
This commit is contained in:
Alex Ionescu 2005-05-09 01:14:42 +00:00
parent 9248a9d298
commit 2d9fea6a7c
2 changed files with 4 additions and 11 deletions

View file

@ -2457,9 +2457,11 @@ NtReadFile(IN HANDLE FileHandle,
ProbeForWrite(IoStatusBlock, ProbeForWrite(IoStatusBlock,
sizeof(IO_STATUS_BLOCK), sizeof(IO_STATUS_BLOCK),
sizeof(ULONG)); sizeof(ULONG));
#if 0
ProbeForWrite(Buffer, ProbeForWrite(Buffer,
Length, Length,
sizeof(ULONG)); sizeof(ULONG));
#endif
} }
_SEH_HANDLE _SEH_HANDLE
{ {
@ -2570,16 +2572,7 @@ NtReadFile(IN HANDLE FileHandle,
Irp->Overlay.AsynchronousParameters.UserApcRoutine = ApcRoutine; Irp->Overlay.AsynchronousParameters.UserApcRoutine = ApcRoutine;
Irp->Overlay.AsynchronousParameters.UserApcContext = ApcContext; Irp->Overlay.AsynchronousParameters.UserApcContext = ApcContext;
Irp->Flags |= IRP_READ_OPERATION; Irp->Flags |= IRP_READ_OPERATION;
if (FileObject->Flags & FO_NO_INTERMEDIATE_BUFFERING) Irp->Flags |= IRP_NOCACHE;
/* FIXME: KDBG is using this flag and not reading from cluster-aligned. Investigate. */
#if 0
if (FileObject->Flags & FO_NO_INTERMEDIATE_BUFFERING)
{
DbgBreakPoint();
Irp->Flags |= IRP_NOCACHE;
DPRINT1("It's us: %p\n", FileObject);
}
#endif
/* Setup Stack Data */ /* Setup Stack Data */
StackPtr = IoGetNextIrpStackLocation(Irp); StackPtr = IoGetNextIrpStackLocation(Irp);

View file

@ -439,7 +439,7 @@ KdbpSymLoadModuleSymbols(IN PUNICODE_STRING FileName,
&ObjectAttributes, &ObjectAttributes,
&IoStatusBlock, &IoStatusBlock,
FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE,
FILE_SYNCHRONOUS_IO_NONALERT|FILE_NO_INTERMEDIATE_BUFFERING); FILE_SYNCHRONOUS_IO_NONALERT);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
DPRINT("Could not open image file: %wZ\n", &FileName); DPRINT("Could not open image file: %wZ\n", &FileName);