- Allow KdpReadVirtualMemory to read SharedUserData since it's now readable.
- Allow it to read user-mode pointers as well, just not null-pointers.
- Fix KdpReportExceptionStateChange by implementing DumpTraceData. Now the crash in ndis.sys gets caught.
- Next up: implement breakpoints so that stepping out works.
svn path=/trunk/; revision=25997
- Fix KdPollBreakIn.
- Add initial debug breakpoint code to ExpInitializeExecutive.
- WinDBG now breaks at the initial breakpoint and you can continue execution from there.
- There's still a lot of weird hangs when using WinDBG, it's far from usable.
svn path=/trunk/; revision=25996
- Fully support _WINKD_. Change this to 1, and get kdcom.dll from Windows 2003 or TinyKRNL and you'll be able to connect to WinDBG if using the right debug settings. You can now boot to desktop with WinDBG connected and see debug messages, but not much else is supported.
- Fix bugs in KeGetBugMessageText.
- Implement KeEnterKernelDebugger.
svn path=/trunk/; revision=25994
- Free MDLs in a safer way by not actually using the Irp->MdlAddress as we're looping through them.
- Don't leak an event for each Asynchronous API anymore.
- Handle IRP_OB_QUERY_NAME completion properly.
- handle IRP_CREATE_OPERATION with a file object present.
- Use deferred delete for File Object dereferences, to speed up I/O completion.
- Clear the I/O Stack Location when parsing completion stacks.
- Support SL_ERROR_RETURNED during completion routines.
svn path=/trunk/; revision=25993
- Support _WINKD_ in ntoskrnl.rbuild to build KD64 instead of KDBG/KD if it's enabled.
- Remove some incorrect kernel exports.
svn path=/trunk/; revision=25988
- Add support for _WINKD_ definition to use kd64.h instead of kd.h, as well as disable usage of rossym.h
- Add KdSystemDebugControl, NtSet/QueryDebugFilterState to kdapi.c for the KD64 code.
svn path=/trunk/; revision=25986
- Enable call to KdDebuggerInitialize1 even in trunk, since it doesn't do anything.
- Make i8042prt stop using a reactos-only kernel export hack (KdpServiceDispatcher),and use KdSystemDebugControl instead, which is the NT version and fully-exported.
- Implement a stub KdSystemDebugControl and export it.
svn path=/trunk/; revision=25985
- Fix a bug in KeQueryPerformanceCounter which wasn't handling the possibility of an invalid counter value.
- Don't disable/enable interrupts in HalpInitializeClock and HalCalibratePerformanceCounter. Instead, save the flags, disable, and then restore flags, so that if interrupts were disabled initially, they'll remain that way.
- Make KeUpdateRunTime and KeUpdateSystemTime support KPRCB->SkipTick.
- Atomically check for DPC routine active by referencing fs. Also update Debug DPC time.
- Add support for detecting break-in during KeUpdateSystemTime.
- DPC Routine active is a BOOLEAN, not a ULONG. Fix the check in KeUpdateRunTime since this might've messed up a lot of things.
- Temporarily disable DbgBreakPoint during DbgPrint.
- Hang in KeQueryPerformanceCounter while WinDBG is connected is now fixed, as well as DbgPrint support. WinDBG can now remain connected and show all the DebugPrints! (But GUI doesn't boot -- yet).
svn path=/trunk/; revision=25984
- Fix a bug in KiRecordDr7 setting the new DR7 mask.
- Make KiEspToTrapFrame thread-safe by raising to APC_LEVEL to make sure a thread/set context doesn't corrupt the state.
- Fix thread-safe IRQL Code in KeContexToTrapFrame/KeTrapFrameToContext.
- Fix KiDispatchException to properly handle KI_EXCEPTION_ACCESS_VIOLATION and convert it back to STATUS_ACCESS_VIOLATION which is what the system expects.
- Also fix the way we do bugchecks so the the trapframe gets properly put as a parameter.
- Make KiDebugService call into KiTrap3 to share code (merge from kd-branch).
- Changes to the KdpEnterDebuggerException hack we have to handle this change.
- Temporarily disable DebugPrint functionality (sorry, I'm onto a big bug here!)
svn path=/trunk/; revision=25975
- DebugPrint/DebugPrompt should have an int3 after the int2d, and the int2d handler should ++ the trap frame's EIP to compensate (merge from kd-branch).
- Remove KDB symbol hooks (merge from kd-branch).
- Make PSEH compialble in MSVC again after Greatlord's break.
- Fix KiSaveProcessorControlState/KiRestoreProcessorControlState (merge from kd-branch).
- Disable GDB hook/hacks (merge from kd-branch).
- Add KD64 directory from kd-branch with SharedUserData access enabled (no other code changed). It's not currently compiled though, just putting it here.
svn path=/trunk/; revision=25965
- Rename one more duplicated file in the kernel which wasn't caught previously.
- pseh, rossym, cmlib, kdcom, bootvid, rtl compile & link, and ntoskrnl is now down to only 23 linker errors.
svn path=/trunk/; revision=25956
- Add _IN_KERNEL_ define for WDK compatibility when using resstr.h
- The entire kernel can now be compiled with MSVC (read this sentence carefully before throwing out the champagne).
svn path=/trunk/; revision=25954
- Update KrnlFun.c
- Make pushlock.c compile with msvc/wdk.
- Fix definition of HIGH_LEVEL_ENTRIES which was way too small (and thus always 0) which caused frees/allocates in the 3rd-level table not to work properly. MSVC statically detected this, it's unlikely we were hitting this in ROS at the moment but it would've been a bad bug to catch later, yay msvc.
svn path=/trunk/; revision=25944
- Remove double implementation of DebugPrint with a single correct implementation which calls DebugService, and moved DebugPrint to rtl since it can now be shared properly.
svn path=/trunk/; revision=25942
- This allows us to access SharedUserData much earlier in the kernel, as well as in kdcom, which means the Windows/TinyKRNL version should now work without modification.
svn path=/trunk/; revision=25941
- Fix an offset bug which was causing us to read/write to DR7 in a completely random location (somewhere in side the _CONTEXT record).
- Fix a bug in DR save/restore which was making us save dr0,1,2 isntead of dr3,6,7.
- All bugs reported by Aleksey Bragin.
svn path=/trunk/; revision=25938
- Fixes and compatible merges from KD Branch:
- Add stubs for KdSave, KdRestore, KdDebuggerInitialize0, KdSendPacket, KdReceivePacket to kdcom.dll
- Implement and export KeTryToAcquireSpinLockAtDpcLevel.
- Add EXCEPTION_RECORD64 and LIST_ENTRY64, KeTryToAcquireSpinLockAtDpcLevel, BREAKPOINT_COMMAND_STRING, Ke386SetCr2, Ke386SetDr3, Ke386SetDr6.
- Remove non-kernel routines from kdfuncs.h and remove deprecated routines from ke.h.
- Implement KiRestoreProcessorControlState, KeFreezeExecution, KeThawExecution, ExAcquireTimeRefreshLock, ExReleaseTimeRefreshLock.
- Rename ModuleLoadList to PsLoadedModuleList. Add PsNtosImageBase and set value in it.
- Add skeleton wdbgexts.h with what's needed until now, this is a PSDK header.
- Add kddll.h for KDCOM/1394/USB2.DLL prototypes.
- Add windbgkd.h with KD protocol definitions. Used to be an NT5 DDK header, but was removed, so this goes into include\reactos.
- Fix KiDebugService to load EDX from KTRAP_FRAME_EDX, not KTRAP_FRAME_EAX!.
- Fix CommonDispatchException to check for the argument count in ECX, not EAX. Previously we were ignoring parameter counts and never filling out exception records!
- Add KdDebuggerInitialize1 and enable call to it.
- Fix KD_SYMBOLS_INFO definition and DbgLoadImageSymbols prototype.
- Implement DbgUnLoadImageSymbols.
- Fix some small bugs in KeBugCheckWithTf and add various debugger calls/checks where needed.
- Fix bugcheck recursion code which was incorrect.
- Only save/restore CR4 if KeFeatureBits indicates CR4 support exists.
- Export KdDebuggerNotPresent since KDCOM needs it.
- Add KCONTINUE_STATUS.
- Add DBGKD_ANY_CONTROL_SET and X86/IA64/AMD64 control sets.
- Add DBGKD_MANIPULATE_STATE64 and all sub-structures (READ_MEMORY, WRITE_MEMORY, etc).
- Create GCC_ULONG64 type to hack around a bug in GCC which is incapable of creating entries for externals at compile-time for 64-bit pointers.
- Rename NameSpaceRoot to ObpRootDirectoryObject, IopLogListHead to IopErrorLogListHead, BugcheckCallbackListHead to KeBugcheckCallbackListHead, BugcheckReasonCallbackListHead to KeBugcheckReasonCallbackListHead, ObTypeObjectType to ObpTypeObjectType.
- Create ntverp.h and common.ver files. These are the standard files used by the NT/DDK build systems and we should try to support them as well instead of re-defining everything our own way (especially if we want to build ddk-compatible drivers later on).
- Made init.c use version data from ntverp.h instead of hard-coding.
- Defined NT 5.2.3790.1830 as the version we report.
- Fixed up .rc file to be correct and match DDK-sytnax/style.
- For now only the kernel uses this new versionning scheme, but we should change the build system later to use this for every component.
- Fix KiSaveProcessorControlState and KiRestoreProcessorControlSate. The latter doesn't freeze the CPU anymore so it's enabled, and the former doesn't cause WinDBG to panic anymore and display weird data.
- KPROCESSOR_STATE is not 4-byte aligned.
- Use DR_MASK and DR7_OVERRIDE_V in KiUpdateDr7, KiRecordDr7 instead of DR_ACTIVE_MASK.
- Add ExceptionRecord32To64.
- Fix generation of driver name for symbol load.
svn path=/trunk/; revision=25937
1. fixed one BSD it does show bluescreen when the buffer are too small
2. fixed some bugs in calculation of different GdiObject sized
svn path=/trunk/; revision=25935