Mega KD64 revival patch:
authorStefan Ginsberg <stefanginsberg@gmail.com>
Sun, 4 Oct 2009 16:53:15 +0000 (16:53 +0000)
committerStefan Ginsberg <stefanginsberg@gmail.com>
Sun, 4 Oct 2009 16:53:15 +0000 (16:53 +0000)
commit3c5b2d9a615a04173c92259c54e01578fdbd22a2
tree83e0e1876b21b53f34bf91cba5469624f51b9e77
parentf0c0e70c056d943fb1c06b8d4a5ccbedde285096
Mega KD64 revival patch:
KD64
- Fix some 64-bit issues and some x86 specificness.
- Sub out some KdpTrap cases more properly.
- Implement support for .crash and .reboot. Does not seem to work currently because of weird issues.
- Implement KdpDprintf to send strings directly to the debugger from inside of KD64. Use it in KdEnterDebugger instead of DbgPrint so we won't try to enter the debugger recursively.
- Implement KdUpdateDataBlock to set the KeUserCallbackDispatcher pointer in the debugger block after its address is retrieved from ntdll.
- Don't assume breakpoints are 1 byte long in portable code -- use KD_BREAKPOINT_SIZE and define it per architecture.
- KdpStub: KdEnableDebugger returns NTSTATUS, not TRUE/FALSE.

Other
- wdbgexts.h: Properly define CURRENT_KD_SECONDARY_VERSION for AMD64.
- Make PsNtosImageBase pointer-sized as it should be.
- Change the definition of KDSTATUS so it is guaranteed to be 32-bit.
- Fix a critical bug in KiRestoreProcessorControlState: it didn't clear the busy flag in the TSS before reloading the task register, resulting in a GPF if we tried to reload the same register.
- Add macros for getting and setting special purpose registers (the Program Counter and the "return register") in portable code instead of using #ifdef every time. Do likewise for setting IMAGE_FILE_MACHINE_XXX, using a new IMAGE_FILE_MACHINE_ARCHITECTURE macro.
- Don't refer to the Program Counter as "Eip" in portable code.
- Define DBG_STATUS_CONTROL_C for assembly code and use it in KeUpdateSystemTime.

svn path=/trunk/; revision=43283
23 files changed:
reactos/include/ndk/asm.h
reactos/include/psdk/wdbgexts.h
reactos/include/reactos/kddll.h
reactos/ntoskrnl/ex/init.c
reactos/ntoskrnl/include/internal/arm/ke.h
reactos/ntoskrnl/include/internal/i386/ke.h
reactos/ntoskrnl/include/internal/kd64.h
reactos/ntoskrnl/include/internal/powerpc/ke.h
reactos/ntoskrnl/include/internal/ps.h
reactos/ntoskrnl/kd/kdmain.c
reactos/ntoskrnl/kd64/kdapi.c
reactos/ntoskrnl/kd64/kddata.c
reactos/ntoskrnl/kd64/kdinit.c
reactos/ntoskrnl/kd64/kdprint.c
reactos/ntoskrnl/kd64/kdtrap.c
reactos/ntoskrnl/ke/bug.c
reactos/ntoskrnl/ke/i386/cpu.c
reactos/ntoskrnl/ke/i386/systimer.S
reactos/ntoskrnl/ke/profobj.c
reactos/ntoskrnl/mm/sysldr.c
reactos/ntoskrnl/ps/psmgr.c
reactos/ntoskrnl/ps/thread.c
reactos/ntoskrnl/rtl/libsupp.c