ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
November 2020
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
18 participants
162 discussions
Start a n
N
ew thread
[reactos] 28/32: [NTOS:KD] Remove useless define
by Hervé Poussineau
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=67e9cc00b2cf02ccb2374…
commit 67e9cc00b2cf02ccb23749a59e08314fa95cad5d Author: Hervé Poussineau <hpoussin(a)reactos.org> AuthorDate: Tue Mar 31 23:35:27 2020 +0200 Commit: Hervé Poussineau <hpoussin(a)reactos.org> CommitDate: Mon Nov 16 08:55:03 2020 +0100 [NTOS:KD] Remove useless define KdbEnterDebuggerException() is only called when KDBG is defined. --- ntoskrnl/include/internal/kd.h | 1 - 1 file changed, 1 deletion(-) diff --git a/ntoskrnl/include/internal/kd.h b/ntoskrnl/include/internal/kd.h index b317cea3084..4a7ba13b382 100644 --- a/ntoskrnl/include/internal/kd.h +++ b/ntoskrnl/include/internal/kd.h @@ -76,7 +76,6 @@ KdbSymGetAddressInformation( # define KdbInit() KdbpCliInit() # define KdbModuleLoaded(FILENAME) KdbpCliModuleLoaded(FILENAME) #else -# define KdbEnterDebuggerException(ER, PM, C, TF, F) kdHandleException # define KdbInit() do { } while (0) # define KdbEnter() do { } while (0) # define KdbModuleLoaded(X) do { } while (0)
4 years, 1 month
1
0
0
0
[reactos] 27/32: [NTOS:KD] Remove useless variables/members
by Hervé Poussineau
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=95faf65ebf3e5d0f4bd3a…
commit 95faf65ebf3e5d0f4bd3a41b7d89655fde480359 Author: Hervé Poussineau <hpoussin(a)reactos.org> AuthorDate: Sat Mar 28 19:15:57 2020 +0100 Commit: Hervé Poussineau <hpoussin(a)reactos.org> CommitDate: Mon Nov 16 08:55:03 2020 +0100 [NTOS:KD] Remove useless variables/members Those where only set and never read. --- ntoskrnl/include/internal/kd.h | 26 ------------------- ntoskrnl/kd/kdio.c | 8 ------ ntoskrnl/kd/kdmain.c | 58 ++---------------------------------------- ntoskrnl/kd64/kddata.c | 6 ----- 4 files changed, 2 insertions(+), 96 deletions(-) diff --git a/ntoskrnl/include/internal/kd.h b/ntoskrnl/include/internal/kd.h index 7f727c0df8c..b317cea3084 100644 --- a/ntoskrnl/include/internal/kd.h +++ b/ntoskrnl/include/internal/kd.h @@ -105,18 +105,6 @@ VOID ULONG Length ); -typedef -VOID -(NTAPI*PKDP_PROMPT_ROUTINE)(PCH String); - -typedef -KD_CONTINUE_TYPE -(NTAPI*PKDP_EXCEPTION_ROUTINE)( - PEXCEPTION_RECORD ExceptionRecord, - PCONTEXT Context, - PKTRAP_FRAME TrapFrame -); - /* INIT ROUTINES *************************************************************/ BOOLEAN @@ -239,19 +227,11 @@ typedef struct _KD_DISPATCH_TABLE LIST_ENTRY KdProvidersList; PKDP_INIT_ROUTINE KdpInitRoutine; PKDP_PRINT_ROUTINE KdpPrintRoutine; - PKDP_PROMPT_ROUTINE KdpPromptRoutine; - PKDP_EXCEPTION_ROUTINE KdpExceptionRoutine; } KD_DISPATCH_TABLE, *PKD_DISPATCH_TABLE; /* The current Debugging Mode */ extern KDP_DEBUG_MODE KdpDebugMode; -/* The current Port IRQ */ -extern ULONG KdpPortIrq; - -/* The current Port */ -extern ULONG KdpPort; - /* Port Information for the Serial Native Mode */ extern ULONG SerialPortNumber; extern CPPORT SerialPortInfo; @@ -259,15 +239,9 @@ extern CPPORT SerialPortInfo; /* Init Functions for Native Providers */ extern PKDP_INIT_ROUTINE InitRoutines[KdMax]; -/* Wrapper Init Function */ -extern PKDP_INIT_ROUTINE WrapperInitRoutine; - /* Dispatch Tables for Native Providers */ extern KD_DISPATCH_TABLE DispatchTable[KdMax]; -/* Dispatch Table for the Wrapper */ -extern KD_DISPATCH_TABLE WrapperTable; - /* The KD Native Provider List */ extern LIST_ENTRY KdProviders; diff --git a/ntoskrnl/kd/kdio.c b/ntoskrnl/kd/kdio.c index 8fb73f23ccd..d98ab455419 100644 --- a/ntoskrnl/kd/kdio.c +++ b/ntoskrnl/kd/kdio.c @@ -31,9 +31,6 @@ static KSPIN_LOCK KdpSerialSpinLock; ULONG SerialPortNumber = DEFAULT_DEBUG_PORT; CPPORT SerialPortInfo = {0, DEFAULT_DEBUG_BAUD_RATE, 0}; -/* Current Port in use. FIXME: Do we support more than one? */ -ULONG KdpPort; - #define KdpScreenLineLengthDefault 80 static CHAR KdpScreenLineBuffer[KdpScreenLineLengthDefault + 1] = ""; static ULONG KdpScreenLineBufferPos = 0, KdpScreenLineLength = 0; @@ -543,11 +540,6 @@ KdSendPacket( /* Next Table */ CurrentEntry = CurrentEntry->Flink; } - - /* Call the Wrapper Routine */ - if (WrapperTable.KdpPrintRoutine) - WrapperTable.KdpPrintRoutine(Output->Buffer, Output->Length); - return; } else if (PacketType == PACKET_TYPE_KD_STATE_CHANGE64) diff --git a/ntoskrnl/kd/kdmain.c b/ntoskrnl/kd/kdmain.c index 83009cd80db..9ae8552758c 100644 --- a/ntoskrnl/kd/kdmain.c +++ b/ntoskrnl/kd/kdmain.c @@ -15,7 +15,6 @@ VOID NTAPI PspDumpThreads(BOOLEAN SystemThreads); -extern CPPORT PortInfo; extern ANSI_STRING KdpLogFileName; /* PRIVATE FUNCTIONS *********************************************************/ @@ -49,14 +48,6 @@ KdpReportExceptionStateChange(IN PEXCEPTION_RECORD ExceptionRecord, TrapFrame, !SecondChanceException); #else /* not KDBG */ - if (WrapperInitRoutine) - { - /* Call GDB */ - Return = WrapperTable.KdpExceptionRoutine(ExceptionRecord, - ContextRecord, - TrapFrame); - } - /* We'll manually dump the stack for the user... */ KeRosDumpStackFrames(NULL, 0); #endif /* not KDBG */ @@ -99,7 +90,6 @@ KdpGetDebugMode(PCHAR Currentp2) /* Set the port to use */ SerialPortNumber = Value; - KdpPort = Value; } } else @@ -110,7 +100,6 @@ KdpGetDebugMode(PCHAR Currentp2) KdpDebugMode.Serial = TRUE; SerialPortInfo.Address = UlongToPtr(Value); SerialPortNumber = 0; - KdpPort = 0; } } } @@ -138,9 +127,8 @@ NTAPI KdDebuggerInitialize0( IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL) { - ULONG Value; ULONG i; - PCHAR CommandLine, Port = NULL, BaudRate = NULL, Irq = NULL; + PCHAR CommandLine, Port = NULL; if (LoaderBlock) { @@ -156,10 +144,8 @@ KdDebuggerInitialize0( KdbpGetCommandLineSettings(CommandLine); #endif - /* Get the port and baud rate */ + /* Get the port */ Port = strstr(CommandLine, "DEBUGPORT"); - BaudRate = strstr(CommandLine, "BAUDRATE"); - Irq = strstr(CommandLine, "IRQ"); } } @@ -182,42 +168,6 @@ KdDebuggerInitialize0( if (KdpDebugMode.Value == 0) KdpDebugMode.Serial = TRUE; - /* Check if we got a baud rate */ - if (BaudRate) - { - /* Move past the actual string, to reach the rate */ - BaudRate += sizeof("BAUDRATE") - 1; - - /* Now get past any spaces */ - while (*BaudRate == ' ') BaudRate++; - - /* And make sure we have a rate */ - if (*BaudRate) - { - /* Read and set it */ - Value = atol(BaudRate + 1); - if (Value) PortInfo.BaudRate = SerialPortInfo.BaudRate = Value; - } - } - - /* Check Serial Port Settings [IRQ] */ - if (Irq) - { - /* Move past the actual string, to reach the rate */ - Irq += sizeof("IRQ") - 1; - - /* Now get past any spaces */ - while (*Irq == ' ') Irq++; - - /* And make sure we have an IRQ */ - if (*Irq) - { - /* Read and set it */ - Value = atol(Irq + 1); - if (Value) KdpPortIrq = Value; - } - } - /* Call Providers at Phase 0 */ for (i = 0; i < KdMax; i++) { @@ -251,10 +201,6 @@ KdDebuggerInitialize1( CurrentEntry = CurrentEntry->Flink; } - /* Call the Wrapper Init Routine */ - if (WrapperInitRoutine) - WrapperTable.KdpInitRoutine(&WrapperTable, 1); - NtGlobalFlag |= FLG_STOP_ON_EXCEPTION; return STATUS_SUCCESS; diff --git a/ntoskrnl/kd64/kddata.c b/ntoskrnl/kd64/kddata.c index 2049583026f..c83f9f6665b 100644 --- a/ntoskrnl/kd64/kddata.c +++ b/ntoskrnl/kd64/kddata.c @@ -138,13 +138,7 @@ ULONG KdPrintBufferSize = sizeof(KdPrintDefaultCircularBuffer); ULONG KdPrintBufferChanges = 0; #ifndef _WINKD_ -/* Make bochs debug output in the very early boot phase available */ -ULONG PortNumber = DEFAULT_DEBUG_PORT; -CPPORT PortInfo = {0, DEFAULT_DEBUG_BAUD_RATE, 0}; -ULONG KdpPortIrq; KDP_DEBUG_MODE KdpDebugMode; -PKDP_INIT_ROUTINE WrapperInitRoutine; -KD_DISPATCH_TABLE WrapperTable; LIST_ENTRY KdProviders = {&KdProviders, &KdProviders}; KD_DISPATCH_TABLE DispatchTable[KdMax];
4 years, 1 month
1
0
0
0
[reactos] 26/32: [NTOS:KD] Remove Bochs port debugging
by Hervé Poussineau
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8d3a395101e2c166e1d30…
commit 8d3a395101e2c166e1d302715b841967c9757d1d Author: Hervé Poussineau <hpoussin(a)reactos.org> AuthorDate: Sat Mar 28 10:45:31 2020 +0100 Commit: Hervé Poussineau <hpoussin(a)reactos.org> CommitDate: Mon Nov 16 08:55:03 2020 +0100 [NTOS:KD] Remove Bochs port debugging You can use serial port debugging instead. --- ntoskrnl/include/internal/kd.h | 13 ++------ ntoskrnl/kd/kdmain.c | 7 ----- ntoskrnl/kd/wrappers/bochs.c | 67 ------------------------------------------ ntoskrnl/kd64/kddata.c | 6 ---- ntoskrnl/ntos.cmake | 1 - 5 files changed, 2 insertions(+), 92 deletions(-) diff --git a/ntoskrnl/include/internal/kd.h b/ntoskrnl/include/internal/kd.h index 36a7394074e..7f727c0df8c 100644 --- a/ntoskrnl/include/internal/kd.h +++ b/ntoskrnl/include/internal/kd.h @@ -153,13 +153,6 @@ KdpDebugLogInit( ULONG BootPhase ); -VOID -NTAPI -KdpBochsInit( - struct _KD_DISPATCH_TABLE *DispatchTable, - ULONG BootPhase -); - VOID NTAPI KdpKdbgInit( @@ -202,9 +195,8 @@ KdpSafeWriteMemory( #define KdScreen 0 #define KdSerial 1 #define KdFile 2 -#define KdBochs 3 -#define KdKdbg 4 -#define KdMax 5 +#define KdKdbg 3 +#define KdMax 4 /* KD Private Debug Modes */ typedef struct _KDP_DEBUG_MODE @@ -217,7 +209,6 @@ typedef struct _KDP_DEBUG_MODE UCHAR Screen :1; UCHAR Serial :1; UCHAR File :1; - UCHAR Bochs :1; }; /* Generic Value */ diff --git a/ntoskrnl/kd/kdmain.c b/ntoskrnl/kd/kdmain.c index 40718b5d5fc..83009cd80db 100644 --- a/ntoskrnl/kd/kdmain.c +++ b/ntoskrnl/kd/kdmain.c @@ -129,13 +129,6 @@ KdpGetDebugMode(PCHAR Currentp2) KdpLogFileName.Buffer = p1; } } - /* Check for BOCHS Debugging */ - else if (!_strnicmp(p2, "BOCHS", 5)) - { - /* Enable It */ - p2 += 5; - KdpDebugMode.Bochs = TRUE; - } return p2; } diff --git a/ntoskrnl/kd/wrappers/bochs.c b/ntoskrnl/kd/wrappers/bochs.c deleted file mode 100644 index 642d14df6c7..00000000000 --- a/ntoskrnl/kd/wrappers/bochs.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/kd/wrappers/bochs.c - * PURPOSE: BOCHS Wrapper for Kd - * - * PROGRAMMERS: Alex Ionescu (alex(a)relsoft.net) - */ - -#include <ntoskrnl.h> -#define NDEBUG -#include <debug.h> - -/* bochs debug output */ -#define BOCHS_LOGGER_PORT ((PVOID)0xe9) - -/* FUNCTIONS *****************************************************************/ - -VOID -NTAPI -KdpBochsDebugPrint(IN PCH Message, - IN ULONG Length) -{ - if (!KdpDebugMode.Bochs) return; - - while (*Message != 0) - { - if (*Message == '\n') - { - WRITE_PORT_UCHAR(BOCHS_LOGGER_PORT, '\r'); - } - WRITE_PORT_UCHAR(BOCHS_LOGGER_PORT, *Message); - Message++; - } -} - -VOID -NTAPI -KdpBochsInit(PKD_DISPATCH_TABLE DispatchTable, - ULONG BootPhase) -{ - UCHAR Value; - if (!KdpDebugMode.Bochs) return; - - if (BootPhase == 0) - { - Value = READ_PORT_UCHAR(BOCHS_LOGGER_PORT); - if (Value != (ULONG_PTR)BOCHS_LOGGER_PORT) - { - KdpDebugMode.Bochs = FALSE; - return; - } - - /* Write out the functions that we support for now */ - DispatchTable->KdpInitRoutine = KdpBochsInit; - DispatchTable->KdpPrintRoutine = KdpBochsDebugPrint; - - /* Register as a Provider */ - InsertTailList(&KdProviders, &DispatchTable->KdProvidersList); - } - else if (BootPhase == 2) - { - HalDisplayString("\r\n Bochs debugging enabled\r\n\r\n"); - } -} - -/* EOF */ diff --git a/ntoskrnl/kd64/kddata.c b/ntoskrnl/kd64/kddata.c index 6d32ad6ec77..2049583026f 100644 --- a/ntoskrnl/kd64/kddata.c +++ b/ntoskrnl/kd64/kddata.c @@ -139,15 +139,10 @@ ULONG KdPrintBufferChanges = 0; #ifndef _WINKD_ /* Make bochs debug output in the very early boot phase available */ -//#define AUTO_ENABLE_BOCHS ULONG PortNumber = DEFAULT_DEBUG_PORT; CPPORT PortInfo = {0, DEFAULT_DEBUG_BAUD_RATE, 0}; ULONG KdpPortIrq; -#ifdef AUTO_ENABLE_BOCHS -KDP_DEBUG_MODE KdpDebugMode = {{{.Bochs=TRUE}}}; -#else KDP_DEBUG_MODE KdpDebugMode; -#endif PKDP_INIT_ROUTINE WrapperInitRoutine; KD_DISPATCH_TABLE WrapperTable; LIST_ENTRY KdProviders = {&KdProviders, &KdProviders}; @@ -156,7 +151,6 @@ KD_DISPATCH_TABLE DispatchTable[KdMax]; PKDP_INIT_ROUTINE InitRoutines[KdMax] = {KdpScreenInit, KdpSerialInit, KdpDebugLogInit, - KdpBochsInit, KdpKdbgInit}; #endif diff --git a/ntoskrnl/ntos.cmake b/ntoskrnl/ntos.cmake index 110dae4b3e6..7b1c0f93cde 100644 --- a/ntoskrnl/ntos.cmake +++ b/ntoskrnl/ntos.cmake @@ -404,7 +404,6 @@ if(NOT _WINKD_) endif() list(APPEND SOURCE - ${REACTOS_SOURCE_DIR}/ntoskrnl/kd/wrappers/bochs.c ${REACTOS_SOURCE_DIR}/ntoskrnl/kd/wrappers/kdbg.c ${REACTOS_SOURCE_DIR}/ntoskrnl/kd/kdio.c ${REACTOS_SOURCE_DIR}/ntoskrnl/kd/kdmain.c)
4 years, 1 month
1
0
0
0
[reactos] 25/32: [NTOS:KD] Remove useless implementation of BREAKPOINT_PRINT in KdSystemDebugControl
by Hervé Poussineau
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8a62f277d8840e487b01a…
commit 8a62f277d8840e487b01a67ccdcf09ea4242d4fd Author: Hervé Poussineau <hpoussin(a)reactos.org> AuthorDate: Tue Mar 10 00:10:08 2020 +0100 Commit: Hervé Poussineau <hpoussin(a)reactos.org> CommitDate: Mon Nov 16 08:55:03 2020 +0100 [NTOS:KD] Remove useless implementation of BREAKPOINT_PRINT in KdSystemDebugControl This is (as expected) handled in KdpTrap(), which also calls KdpPrint(). --- ntoskrnl/kd64/kdapi.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/ntoskrnl/kd64/kdapi.c b/ntoskrnl/kd64/kdapi.c index 9d4a96631f4..f2c07de2f21 100644 --- a/ntoskrnl/kd64/kdapi.c +++ b/ntoskrnl/kd64/kdapi.c @@ -2167,21 +2167,6 @@ KdSystemDebugControl( /* Handle some internal commands */ switch ((ULONG)Command) { -#ifndef _WINKD_ - case BREAKPOINT_PRINT: /* DbgPrint */ - { - /* Call KDBG */ - BOOLEAN Handled; - return KdpPrint(MAXULONG, - DPFLTR_INFO_LEVEL, - (PCHAR)InputBuffer, - (USHORT)InputBufferLength, - PreviousMode, - NULL, // TrapFrame, - NULL, // ExceptionFrame, - &Handled); - } -#endif #if DBG case ' soR': /* ROS-INTERNAL */ {
4 years, 1 month
1
0
0
0
[reactos] 24/32: [NTOS:KD] Merge KdpReportCommandStringStateChange() with kd64 version
by Hervé Poussineau
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1eda7d7e990d02f84a3c4…
commit 1eda7d7e990d02f84a3c42d6ddffb1f1573a291d Author: Hervé Poussineau <hpoussin(a)reactos.org> AuthorDate: Tue Mar 10 00:01:22 2020 +0100 Commit: Hervé Poussineau <hpoussin(a)reactos.org> CommitDate: Mon Nov 16 08:55:03 2020 +0100 [NTOS:KD] Merge KdpReportCommandStringStateChange() with kd64 version --- ntoskrnl/kd/kdmain.c | 8 -------- ntoskrnl/kd64/kdapi.c | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/ntoskrnl/kd/kdmain.c b/ntoskrnl/kd/kdmain.c index d01244f7200..40718b5d5fc 100644 --- a/ntoskrnl/kd/kdmain.c +++ b/ntoskrnl/kd/kdmain.c @@ -20,14 +20,6 @@ extern ANSI_STRING KdpLogFileName; /* PRIVATE FUNCTIONS *********************************************************/ -VOID -NTAPI -KdpReportCommandStringStateChange(IN PSTRING NameString, - IN PSTRING CommandString, - IN OUT PCONTEXT Context) -{ -} - BOOLEAN NTAPI KdpReportExceptionStateChange(IN PEXCEPTION_RECORD ExceptionRecord, diff --git a/ntoskrnl/kd64/kdapi.c b/ntoskrnl/kd64/kdapi.c index f47514f590e..9d4a96631f4 100644 --- a/ntoskrnl/kd64/kdapi.c +++ b/ntoskrnl/kd64/kdapi.c @@ -1648,7 +1648,6 @@ KdpReportLoadSymbolsStateChange(IN PSTRING PathName, } while (Status == ContinueProcessorReselected); } -#ifdef _WINKD_ VOID NTAPI KdpReportCommandStringStateChange(IN PSTRING NameString, @@ -1726,6 +1725,7 @@ KdpReportCommandStringStateChange(IN PSTRING NameString, } while (Status == ContinueProcessorReselected); } +#ifdef _WINKD_ BOOLEAN NTAPI KdpReportExceptionStateChange(IN PEXCEPTION_RECORD ExceptionRecord,
4 years, 1 month
1
0
0
0
[reactos] 23/32: [NTOS:KD] Merge KdpReportLoadSymbolsStateChange() with kd64 version
by Hervé Poussineau
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6f7835d30c48ed944fb37…
commit 6f7835d30c48ed944fb37ac765055aa74e950205 Author: Hervé Poussineau <hpoussin(a)reactos.org> AuthorDate: Tue Mar 10 00:00:00 2020 +0100 Commit: Hervé Poussineau <hpoussin(a)reactos.org> CommitDate: Mon Nov 16 08:55:03 2020 +0100 [NTOS:KD] Merge KdpReportLoadSymbolsStateChange() with kd64 version --- ntoskrnl/kd/kdio.c | 27 +++++++++++++++++++++++++++ ntoskrnl/kd/kdmain.c | 22 ---------------------- ntoskrnl/kd64/kdapi.c | 2 +- 3 files changed, 28 insertions(+), 23 deletions(-) diff --git a/ntoskrnl/kd/kdio.c b/ntoskrnl/kd/kdio.c index d76e3f55860..8fb73f23ccd 100644 --- a/ntoskrnl/kd/kdio.c +++ b/ntoskrnl/kd/kdio.c @@ -550,6 +550,25 @@ KdSendPacket( return; } + else if (PacketType == PACKET_TYPE_KD_STATE_CHANGE64) + { + PDBGKD_ANY_WAIT_STATE_CHANGE WaitStateChange = (PDBGKD_ANY_WAIT_STATE_CHANGE)MessageHeader->Buffer; + if (WaitStateChange->NewState == DbgKdLoadSymbolsStateChange) + { +#ifdef KDBG + PLDR_DATA_TABLE_ENTRY LdrEntry; + if (!WaitStateChange->u.LoadSymbols.UnloadSymbols) + { + /* Load symbols. Currently implemented only for KDBG! */ + if (KdbpSymFindModule((PVOID)(ULONG_PTR)WaitStateChange->u.LoadSymbols.BaseOfDll, NULL, -1, &LdrEntry)) + { + KdbSymProcessSymbols(LdrEntry); + } + } +#endif + return; + } + } UNIMPLEMENTED; } @@ -572,6 +591,14 @@ KdReceivePacket( STRING ResponseString; #endif + if (PacketType == PACKET_TYPE_KD_STATE_MANIPULATE) + { + PDBGKD_MANIPULATE_STATE64 ManipulateState = (PDBGKD_MANIPULATE_STATE64)MessageHeader->Buffer; + ManipulateState->ApiNumber = DbgKdContinueApi; + ManipulateState->u.Continue.ContinueStatus = STATUS_SUCCESS; + return KdPacketReceived; + } + if (PacketType != PACKET_TYPE_KD_DEBUG_IO) return KdPacketTimedOut; diff --git a/ntoskrnl/kd/kdmain.c b/ntoskrnl/kd/kdmain.c index fb838d60124..d01244f7200 100644 --- a/ntoskrnl/kd/kdmain.c +++ b/ntoskrnl/kd/kdmain.c @@ -28,28 +28,6 @@ KdpReportCommandStringStateChange(IN PSTRING NameString, { } -VOID -NTAPI -KdpReportLoadSymbolsStateChange(IN PSTRING PathName, - IN PKD_SYMBOLS_INFO SymbolInfo, - IN BOOLEAN Unload, - IN OUT PCONTEXT Context) -{ -#ifdef KDBG - PKD_SYMBOLS_INFO SymbolsInfo = SymbolInfo; - PLDR_DATA_TABLE_ENTRY LdrEntry; - - if (SymbolsInfo != NULL && !Unload) - { - /* Load symbols. Currently implemented only for KDBG! */ - if (KdbpSymFindModule(SymbolsInfo->BaseOfDll, NULL, -1, &LdrEntry)) - { - KdbSymProcessSymbols(LdrEntry); - } - } -#endif -} - BOOLEAN NTAPI KdpReportExceptionStateChange(IN PEXCEPTION_RECORD ExceptionRecord, diff --git a/ntoskrnl/kd64/kdapi.c b/ntoskrnl/kd64/kdapi.c index f844e972b48..f47514f590e 100644 --- a/ntoskrnl/kd64/kdapi.c +++ b/ntoskrnl/kd64/kdapi.c @@ -1576,7 +1576,6 @@ SendPacket: } } -#ifdef _WINKD_ VOID NTAPI KdpReportLoadSymbolsStateChange(IN PSTRING PathName, @@ -1649,6 +1648,7 @@ KdpReportLoadSymbolsStateChange(IN PSTRING PathName, } while (Status == ContinueProcessorReselected); } +#ifdef _WINKD_ VOID NTAPI KdpReportCommandStringStateChange(IN PSTRING NameString,
4 years, 1 month
1
0
0
0
[reactos] 22/32: [NTOS:KD] Merge KdEnableDebuggerWithLock()/KdDisableDebuggerWithLock() with kd64 version
by Hervé Poussineau
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e31be4ec25007c40f422b…
commit e31be4ec25007c40f422b15b30a6830d95e225c0 Author: Hervé Poussineau <hpoussin(a)reactos.org> AuthorDate: Mon Mar 9 23:48:55 2020 +0100 Commit: Hervé Poussineau <hpoussin(a)reactos.org> CommitDate: Mon Nov 16 08:55:03 2020 +0100 [NTOS:KD] Merge KdEnableDebuggerWithLock()/KdDisableDebuggerWithLock() with kd64 version --- ntoskrnl/kd64/kdapi.c | 43 ------------------------------------------- 1 file changed, 43 deletions(-) diff --git a/ntoskrnl/kd64/kdapi.c b/ntoskrnl/kd64/kdapi.c index 5aeb7dc6750..f844e972b48 100644 --- a/ntoskrnl/kd64/kdapi.c +++ b/ntoskrnl/kd64/kdapi.c @@ -1964,7 +1964,6 @@ NTSTATUS NTAPI KdEnableDebuggerWithLock(IN BOOLEAN NeedLock) { -#ifdef _WINKD_ KIRQL OldIrql; #if defined(__GNUC__) @@ -2035,31 +2034,12 @@ KdEnableDebuggerWithLock(IN BOOLEAN NeedLock) /* We're done */ return STATUS_SUCCESS; -#else - KIRQL OldIrql; - - /* Raise IRQL */ - KeRaiseIrql(DISPATCH_LEVEL, &OldIrql); - - /* TODO: Re-enable any breakpoints */ - - /* Enable the Debugger */ - KdDebuggerEnabled = TRUE; - SharedUserData->KdDebuggerEnabled = TRUE; - - /* Lower the IRQL */ - KeLowerIrql(OldIrql); - - /* Return success */ - return STATUS_SUCCESS; -#endif } NTSTATUS NTAPI KdDisableDebuggerWithLock(IN BOOLEAN NeedLock) { -#ifdef _WINKD_ KIRQL OldIrql; NTSTATUS Status; @@ -2144,29 +2124,6 @@ KdDisableDebuggerWithLock(IN BOOLEAN NeedLock) /* We're done */ return STATUS_SUCCESS; -#else - KIRQL OldIrql; - - if (!NeedLock) - { - return STATUS_ACCESS_DENIED; - } - - /* Raise IRQL */ - KeRaiseIrql(DISPATCH_LEVEL, &OldIrql); - - /* TODO: Disable any breakpoints */ - - /* Disable the Debugger */ - KdDebuggerEnabled = FALSE; - SharedUserData->KdDebuggerEnabled = FALSE; - - /* Lower the IRQL */ - KeLowerIrql(OldIrql); - - /* Return success */ - return STATUS_SUCCESS; -#endif } /* PUBLIC FUNCTIONS **********************************************************/
4 years, 1 month
1
0
0
0
[reactos] 21/32: [NTOS:KD] Merge KdEnterDebugger()/KdExitDebugger() with kd64 version
by Hervé Poussineau
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ebb6f29e69c6cdd0cee8b…
commit ebb6f29e69c6cdd0cee8bb5ca7e7644fb992c22c Author: Hervé Poussineau <hpoussin(a)reactos.org> AuthorDate: Mon Mar 9 23:46:32 2020 +0100 Commit: Hervé Poussineau <hpoussin(a)reactos.org> CommitDate: Mon Nov 16 08:55:03 2020 +0100 [NTOS:KD] Merge KdEnterDebugger()/KdExitDebugger() with kd64 version --- ntoskrnl/kd64/kdapi.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ntoskrnl/kd64/kdapi.c b/ntoskrnl/kd64/kdapi.c index 847fd388fe0..5aeb7dc6750 100644 --- a/ntoskrnl/kd64/kdapi.c +++ b/ntoskrnl/kd64/kdapi.c @@ -1877,7 +1877,6 @@ NTAPI KdEnterDebugger(IN PKTRAP_FRAME TrapFrame, IN PKEXCEPTION_FRAME ExceptionFrame) { -#ifdef _WINKD_ BOOLEAN Enable; /* Check if we have a trap frame */ @@ -1924,16 +1923,12 @@ KdEnterDebugger(IN PKTRAP_FRAME TrapFrame, /* Return if interrupts needs to be re-enabled */ return Enable; -#else - return FALSE; -#endif } VOID NTAPI KdExitDebugger(IN BOOLEAN Enable) { -#ifdef _WINKD_ ULONG TimeSlip; /* Restore the state and unlock the port */ @@ -1963,7 +1958,6 @@ KdExitDebugger(IN BOOLEAN Enable) InterlockedIncrement(&KdpTimeSlipPending); KeInsertQueueDpc(&KdpTimeSlipDpc, NULL, NULL); // FIXME: this can trigger context switches! } -#endif } NTSTATUS
4 years, 1 month
1
0
0
0
[reactos] 20/32: [NTOS:KD] Remove useless uses of _WINKD_
by Hervé Poussineau
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=81b184741d9b32e8eff96…
commit 81b184741d9b32e8eff96bc93ee059938f4d853d Author: Hervé Poussineau <hpoussin(a)reactos.org> AuthorDate: Mon Mar 9 23:45:22 2020 +0100 Commit: Hervé Poussineau <hpoussin(a)reactos.org> CommitDate: Mon Nov 16 08:55:03 2020 +0100 [NTOS:KD] Remove useless uses of _WINKD_ --- ntoskrnl/kd/kdmain.c | 5 +++++ ntoskrnl/kd64/kdapi.c | 7 +------ ntoskrnl/kd64/kdinit.c | 15 --------------- ntoskrnl/kd64/kdlock.c | 4 ---- ntoskrnl/ntos.cmake | 38 +++++++++++--------------------------- 5 files changed, 17 insertions(+), 52 deletions(-) diff --git a/ntoskrnl/kd/kdmain.c b/ntoskrnl/kd/kdmain.c index 20b19911bc6..fb838d60124 100644 --- a/ntoskrnl/kd/kdmain.c +++ b/ntoskrnl/kd/kdmain.c @@ -188,6 +188,11 @@ KdDebuggerInitialize0( /* Upcase it */ _strupr(CommandLine); +#ifdef KDBG + /* Get the KDBG Settings */ + KdbpGetCommandLineSettings(CommandLine); +#endif + /* Get the port and baud rate */ Port = strstr(CommandLine, "DEBUGPORT"); BaudRate = strstr(CommandLine, "BAUDRATE"); diff --git a/ntoskrnl/kd64/kdapi.c b/ntoskrnl/kd64/kdapi.c index df8876bc79a..847fd388fe0 100644 --- a/ntoskrnl/kd64/kdapi.c +++ b/ntoskrnl/kd64/kdapi.c @@ -123,8 +123,6 @@ KdpCopyMemoryChunks( return RemainingLength == 0 ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL; } -#ifdef _WINKD_ - VOID NTAPI KdpQueryMemory(IN PDBGKD_MANIPULATE_STATE64 State, @@ -1578,6 +1576,7 @@ SendPacket: } } +#ifdef _WINKD_ VOID NTAPI KdpReportLoadSymbolsStateChange(IN PSTRING PathName, @@ -1726,9 +1725,7 @@ KdpReportCommandStringStateChange(IN PSTRING NameString, Context); } while (Status == ContinueProcessorReselected); } -#endif -#ifdef _WINKD_ BOOLEAN NTAPI KdpReportExceptionStateChange(IN PEXCEPTION_RECORD ExceptionRecord, @@ -1858,7 +1855,6 @@ KdpSwitchProcessor(IN PEXCEPTION_RECORD ExceptionRecord, return Status; } -#ifdef _WINKD_ LARGE_INTEGER NTAPI KdpQueryPerformanceCounter(IN PKTRAP_FRAME TrapFrame) @@ -1875,7 +1871,6 @@ KdpQueryPerformanceCounter(IN PKTRAP_FRAME TrapFrame) /* Otherwise, do the call */ return KeQueryPerformanceCounter(NULL); } -#endif BOOLEAN NTAPI diff --git a/ntoskrnl/kd64/kdinit.c b/ntoskrnl/kd64/kdinit.c index e3767d4f49f..6b8319605db 100644 --- a/ntoskrnl/kd64/kdinit.c +++ b/ntoskrnl/kd64/kdinit.c @@ -88,11 +88,9 @@ VOID NTAPI KdUpdateDataBlock(VOID) { -#ifdef _WINKD_ /* Update the KeUserCallbackDispatcher pointer */ KdDebuggerDataBlock.KeUserCallbackDispatcher = (ULONG_PTR)KeUserCallbackDispatcher; -#endif } BOOLEAN @@ -250,7 +248,6 @@ KdInitSystem(IN ULONG BootPhase, /* Enable KD */ EnableKd = TRUE; -#ifdef _WINKD_ /* Check if there are any options */ if (DebugLine[5] == '=') { @@ -332,16 +329,6 @@ KdInitSystem(IN ULONG BootPhase, DebugOptionStart = DebugOptionEnd; } } -#else - (VOID)DebugOptionStart; - (VOID)DebugOptionEnd; - (VOID)DebugOptionLength; - KdDebuggerNotPresent = FALSE; -#ifdef KDBG - /* Get the KDBG Settings */ - KdbpGetCommandLineSettings(LoaderBlock->LoadOptions); -#endif -#endif } } else @@ -450,11 +437,9 @@ KdInitSystem(IN ULONG BootPhase, /* Load symbols for image */ RtlInitString(&ImageName, NameBuffer); -#ifdef _WINKD_ DbgLoadImageSymbols(&ImageName, LdrEntry->DllBase, (ULONG_PTR)PsGetCurrentProcessId()); -#endif /* Go to the next entry */ NextEntry = NextEntry->Flink; diff --git a/ntoskrnl/kd64/kdlock.c b/ntoskrnl/kd64/kdlock.c index b75c4534aa0..25e4cde3dc9 100644 --- a/ntoskrnl/kd64/kdlock.c +++ b/ntoskrnl/kd64/kdlock.c @@ -74,7 +74,6 @@ BOOLEAN NTAPI KdPollBreakIn(VOID) { -#ifdef _WINKD_ BOOLEAN DoBreak = FALSE, Enable; /* First make sure that KD is enabled */ @@ -119,7 +118,4 @@ KdPollBreakIn(VOID) /* Tell the caller to do a break */ return DoBreak; -#else - return FALSE; -#endif } diff --git a/ntoskrnl/ntos.cmake b/ntoskrnl/ntos.cmake index caeee0452b0..110dae4b3e6 100644 --- a/ntoskrnl/ntos.cmake +++ b/ntoskrnl/ntos.cmake @@ -164,6 +164,13 @@ list(APPEND SOURCE ${REACTOS_SOURCE_DIR}/ntoskrnl/io/pnpmgr/pnproot.c ${REACTOS_SOURCE_DIR}/ntoskrnl/io/pnpmgr/pnputil.c ${REACTOS_SOURCE_DIR}/ntoskrnl/io/debug.c + ${REACTOS_SOURCE_DIR}/ntoskrnl/kd64/kdapi.c + ${REACTOS_SOURCE_DIR}/ntoskrnl/kd64/kdbreak.c + ${REACTOS_SOURCE_DIR}/ntoskrnl/kd64/kddata.c + ${REACTOS_SOURCE_DIR}/ntoskrnl/kd64/kdinit.c + ${REACTOS_SOURCE_DIR}/ntoskrnl/kd64/kdlock.c + ${REACTOS_SOURCE_DIR}/ntoskrnl/kd64/kdprint.c + ${REACTOS_SOURCE_DIR}/ntoskrnl/kd64/kdtrap.c ${REACTOS_SOURCE_DIR}/ntoskrnl/ke/apc.c ${REACTOS_SOURCE_DIR}/ntoskrnl/ke/balmgr.c ${REACTOS_SOURCE_DIR}/ntoskrnl/ke/bug.c @@ -291,6 +298,7 @@ if(ARCH STREQUAL "i386") ${REACTOS_SOURCE_DIR}/ntoskrnl/rtl/i386/stack.S) list(APPEND SOURCE ${REACTOS_SOURCE_DIR}/ntoskrnl/config/i386/cmhardwr.c + ${REACTOS_SOURCE_DIR}/ntoskrnl/kd64/i386/kdx86.c ${REACTOS_SOURCE_DIR}/ntoskrnl/ke/i386/abios.c ${REACTOS_SOURCE_DIR}/ntoskrnl/ke/i386/cpu.c ${REACTOS_SOURCE_DIR}/ntoskrnl/ke/i386/context.c @@ -318,6 +326,7 @@ elseif(ARCH STREQUAL "amd64") ${REACTOS_SOURCE_DIR}/ntoskrnl/ke/amd64/usercall_asm.S) list(APPEND SOURCE ${REACTOS_SOURCE_DIR}/ntoskrnl/config/i386/cmhardwr.c + ${REACTOS_SOURCE_DIR}/ntoskrnl/kd64/amd64/kdx64.c ${REACTOS_SOURCE_DIR}/ntoskrnl/ke/amd64/context.c ${REACTOS_SOURCE_DIR}/ntoskrnl/ke/amd64/cpu.c ${REACTOS_SOURCE_DIR}/ntoskrnl/ke/amd64/except.c @@ -342,6 +351,7 @@ elseif(ARCH STREQUAL "arm") list(APPEND SOURCE ${REACTOS_SOURCE_DIR}/ntoskrnl/config/arm/cmhardwr.c ${REACTOS_SOURCE_DIR}/ntoskrnl/kd/arm/kdbg.c + ${REACTOS_SOURCE_DIR}/ntoskrnl/kd64/arm/kdarm.c ${REACTOS_SOURCE_DIR}/ntoskrnl/ke/arm/cpu.c ${REACTOS_SOURCE_DIR}/ntoskrnl/ke/arm/exp.c ${REACTOS_SOURCE_DIR}/ntoskrnl/ke/arm/interrupt.c @@ -397,32 +407,6 @@ if(NOT _WINKD_) ${REACTOS_SOURCE_DIR}/ntoskrnl/kd/wrappers/bochs.c ${REACTOS_SOURCE_DIR}/ntoskrnl/kd/wrappers/kdbg.c ${REACTOS_SOURCE_DIR}/ntoskrnl/kd/kdio.c - ${REACTOS_SOURCE_DIR}/ntoskrnl/kd/kdmain.c - ${REACTOS_SOURCE_DIR}/ntoskrnl/kd64/kdapi.c - ${REACTOS_SOURCE_DIR}/ntoskrnl/kd64/kdbreak.c - ${REACTOS_SOURCE_DIR}/ntoskrnl/kd64/kddata.c - ${REACTOS_SOURCE_DIR}/ntoskrnl/kd64/kdinit.c - ${REACTOS_SOURCE_DIR}/ntoskrnl/kd64/kdlock.c - ${REACTOS_SOURCE_DIR}/ntoskrnl/kd64/kdprint.c - ${REACTOS_SOURCE_DIR}/ntoskrnl/kd64/kdtrap.c) - -else() # _WINKD_ - - list(APPEND SOURCE - ${REACTOS_SOURCE_DIR}/ntoskrnl/kd64/kdapi.c - ${REACTOS_SOURCE_DIR}/ntoskrnl/kd64/kdbreak.c - ${REACTOS_SOURCE_DIR}/ntoskrnl/kd64/kddata.c - ${REACTOS_SOURCE_DIR}/ntoskrnl/kd64/kdinit.c - ${REACTOS_SOURCE_DIR}/ntoskrnl/kd64/kdlock.c - ${REACTOS_SOURCE_DIR}/ntoskrnl/kd64/kdprint.c - ${REACTOS_SOURCE_DIR}/ntoskrnl/kd64/kdtrap.c) - - if(ARCH STREQUAL "i386") - list(APPEND SOURCE ${REACTOS_SOURCE_DIR}/ntoskrnl/kd64/i386/kdx86.c) - elseif(ARCH STREQUAL "amd64") - list(APPEND SOURCE ${REACTOS_SOURCE_DIR}/ntoskrnl/kd64/amd64/kdx64.c) - elseif(ARCH STREQUAL "arm") - list(APPEND SOURCE ${REACTOS_SOURCE_DIR}/ntoskrnl/kd64/arm/kdarm.c) - endif() + ${REACTOS_SOURCE_DIR}/ntoskrnl/kd/kdmain.c) endif()
4 years, 1 month
1
0
0
0
[reactos] 19/32: [NTOS:KD] Merge KdpReport() with kd64 version
by Hervé Poussineau
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=329b9fa2fb486ff17bc9d…
commit 329b9fa2fb486ff17bc9d77aeac96982566780f4 Author: Hervé Poussineau <hpoussin(a)reactos.org> AuthorDate: Sun Mar 8 23:16:43 2020 +0100 Commit: Hervé Poussineau <hpoussin(a)reactos.org> CommitDate: Mon Nov 16 08:55:03 2020 +0100 [NTOS:KD] Merge KdpReport() with kd64 version --- ntoskrnl/include/internal/kd64.h | 4 ++++ ntoskrnl/kd/kdmain.c | 15 ++++++++------- ntoskrnl/kd64/kdapi.c | 11 ++++++----- ntoskrnl/kd64/kdtrap.c | 15 ++++----------- 4 files changed, 22 insertions(+), 23 deletions(-) diff --git a/ntoskrnl/include/internal/kd64.h b/ntoskrnl/include/internal/kd64.h index 4802c9c9f60..1806b2fcd09 100644 --- a/ntoskrnl/include/internal/kd64.h +++ b/ntoskrnl/include/internal/kd64.h @@ -281,6 +281,10 @@ NTAPI KdpReportExceptionStateChange( IN PEXCEPTION_RECORD ExceptionRecord, IN OUT PCONTEXT Context, +#ifndef _WINKD_ + IN PKTRAP_FRAME TrapFrame, + IN KPROCESSOR_MODE PreviousMode, +#endif IN BOOLEAN SecondChanceException ); diff --git a/ntoskrnl/kd/kdmain.c b/ntoskrnl/kd/kdmain.c index 53df4366fdb..20b19911bc6 100644 --- a/ntoskrnl/kd/kdmain.c +++ b/ntoskrnl/kd/kdmain.c @@ -52,15 +52,13 @@ KdpReportLoadSymbolsStateChange(IN PSTRING PathName, BOOLEAN NTAPI -KdpReport(IN PKTRAP_FRAME TrapFrame, - IN PKEXCEPTION_FRAME ExceptionFrame, - IN PEXCEPTION_RECORD ExceptionRecord, - IN PCONTEXT ContextRecord, - IN KPROCESSOR_MODE PreviousMode, - IN BOOLEAN SecondChanceException) +KdpReportExceptionStateChange(IN PEXCEPTION_RECORD ExceptionRecord, + IN OUT PCONTEXT ContextRecord, + IN PKTRAP_FRAME TrapFrame, + IN KPROCESSOR_MODE PreviousMode, + IN BOOLEAN SecondChanceException) { KD_CONTINUE_TYPE Return = kdHandleException; - #ifdef KDBG /* Check if this is an assertion failure */ if (ExceptionRecord->ExceptionCode == STATUS_ASSERTION_FAILURE) @@ -288,6 +286,9 @@ KdDebuggerInitialize1( /* Call the Wrapper Init Routine */ if (WrapperInitRoutine) WrapperTable.KdpInitRoutine(&WrapperTable, 1); + + NtGlobalFlag |= FLG_STOP_ON_EXCEPTION; + return STATUS_SUCCESS; } diff --git a/ntoskrnl/kd64/kdapi.c b/ntoskrnl/kd64/kdapi.c index 7e5b908a1e4..df8876bc79a 100644 --- a/ntoskrnl/kd64/kdapi.c +++ b/ntoskrnl/kd64/kdapi.c @@ -1728,13 +1728,13 @@ KdpReportCommandStringStateChange(IN PSTRING NameString, } #endif +#ifdef _WINKD_ BOOLEAN NTAPI KdpReportExceptionStateChange(IN PEXCEPTION_RECORD ExceptionRecord, IN OUT PCONTEXT Context, IN BOOLEAN SecondChanceException) { -#ifdef _WINKD_ STRING Header, Data; DBGKD_ANY_WAIT_STATE_CHANGE WaitStateChange; KCONTINUE_STATUS Status; @@ -1782,11 +1782,8 @@ KdpReportExceptionStateChange(IN PEXCEPTION_RECORD ExceptionRecord, /* Return */ return Status; -#else - UNIMPLEMENTED; - return FALSE; -#endif } +#endif VOID NTAPI @@ -1850,6 +1847,10 @@ KdpSwitchProcessor(IN PEXCEPTION_RECORD ExceptionRecord, /* Report a state change */ Status = KdpReportExceptionStateChange(ExceptionRecord, ContextRecord, +#ifndef _WINKD_ + NULL, + KernelMode, +#endif SecondChanceException); /* Restore the port data and return */ diff --git a/ntoskrnl/kd64/kdtrap.c b/ntoskrnl/kd64/kdtrap.c index 42a04faa460..8f098952ee2 100644 --- a/ntoskrnl/kd64/kdtrap.c +++ b/ntoskrnl/kd64/kdtrap.c @@ -47,16 +47,6 @@ /* FUNCTIONS *****************************************************************/ -#ifndef _WINKD_ -BOOLEAN -NTAPI -KdpReport(IN PKTRAP_FRAME TrapFrame, - IN PKEXCEPTION_FRAME ExceptionFrame, - IN PEXCEPTION_RECORD ExceptionRecord, - IN PCONTEXT ContextRecord, - IN KPROCESSOR_MODE PreviousMode, - IN BOOLEAN SecondChanceException); -#else BOOLEAN NTAPI KdpReport(IN PKTRAP_FRAME TrapFrame, @@ -126,6 +116,10 @@ KdpReport(IN PKTRAP_FRAME TrapFrame, Handled = KdpReportExceptionStateChange(ExceptionRecord, &Prcb->ProcessorState. ContextFrame, +#ifndef _WINKD_ + TrapFrame, + PreviousMode, +#endif SecondChanceException); /* Now restore the processor state, manually again. */ @@ -139,7 +133,6 @@ KdpReport(IN PKTRAP_FRAME TrapFrame, KdpControlCPressed = FALSE; return Handled; } -#endif BOOLEAN NTAPI
4 years, 1 month
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
17
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Results per page:
10
25
50
100
200