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
2025
January
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
October 2009
----- 2025 -----
January 2025
----- 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
26 participants
641 discussions
Start a n
N
ew thread
[cwittich] 43539: sync edit to wine 1.1.31
by cwittich@svn.reactos.org
Author: cwittich Date: Sat Oct 17 21:35:42 2009 New Revision: 43539 URL:
http://svn.reactos.org/svn/reactos?rev=43539&view=rev
Log: sync edit to wine 1.1.31 Modified: trunk/reactos/dll/win32/user32/controls/edit.c Modified: trunk/reactos/dll/win32/user32/controls/edit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/…
============================================================================== --- trunk/reactos/dll/win32/user32/controls/edit.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/controls/edit.c [iso-8859-1] Sat Oct 17 21:35:42 2009 @@ -164,6 +164,7 @@ (LPARAM)(es->hwndSelf)); \ } while(0) + /********************************************************************* * * EM_CANUNDO @@ -1225,7 +1226,7 @@ { WARN("edit hwnd %p already destroyed\n", es->hwndSelf); return; - } + } if (!es->lock_count) { ERR("lock_count == 0 ... please report\n"); @@ -3676,8 +3677,8 @@ } break; case VK_ESCAPE: - if (!(es->style & ES_MULTILINE) && EDIT_IsInsideDialog(es)) - PostMessageW(es->hwndParent, WM_CLOSE, 0, 0); + if ((es->style & ES_MULTILINE) && EDIT_IsInsideDialog(es)) + PostMessageW(es->hwndParent, WM_CLOSE, 0, 0); break; case VK_TAB: if ((es->style & ES_MULTILINE) && EDIT_IsInsideDialog(es)) @@ -4601,8 +4602,8 @@ * WM_XXX messages before WM_NCCREATE is completed. */ - es->is_unicode = unicode; - es->style = lpcs->style; + es->is_unicode = unicode; + es->style = lpcs->style; es->bEnableState = !(es->style & WS_DISABLED); @@ -4670,7 +4671,7 @@ * If WS_BORDER without WS_EX_CLIENTEDGE is specified we shouldn't have * a nonclient area and we should handle painting the border ourselves. * - * When making modifications please ensure that the code still works + * When making modifications please ensure that the code still works * for edit controls created directly with style 0x50800000, exStyle 0 * (which should have a single pixel border) */ @@ -4691,7 +4692,7 @@ static LRESULT EDIT_WM_Create(EDITSTATE *es, LPCWSTR name) { RECT clientRect; - + TRACE("%s\n", debugstr_w(name)); /* * To initialize some final structure members, we call some helper @@ -4701,7 +4702,7 @@ */ EDIT_WM_SetFont(es, 0, FALSE); EDIT_EM_EmptyUndoBuffer(es); - + /* We need to calculate the format rect (applications may send EM_SETMARGINS before the control gets visible) */ GetClientRect(es->hwndSelf, &clientRect); @@ -4803,7 +4804,7 @@ LRESULT result = 0; TRACE("hwnd=%p msg=%x (%s) wparam=%lx lparam=%lx\n", hwnd, msg, SPY_GetMsgName(msg, hwnd), wParam, lParam); - + if (!es && msg != WM_NCCREATE) return DefWindowProcT(hwnd, msg, wParam, lParam, unicode); @@ -5121,6 +5122,9 @@ case EM_SETREADONLY16: #endif case EM_SETREADONLY: + { + DWORD old_style = es->style; + if (wParam) { SetWindowLongPtrW( hwnd, GWL_STYLE, GetWindowLongPtrW( hwnd, GWL_STYLE ) | ES_READONLY ); @@ -5130,8 +5134,13 @@ GetWindowLongPtrW( hwnd, GWL_STYLE ) & ~ES_READONLY ); es->style &= ~ES_READONLY; } - result = 1; - break; + + if (old_style ^ es->style) + InvalidateRect(es->hwndSelf, NULL, TRUE); + + result = 1; + break; + } #ifndef __REACTOS__ case EM_SETWORDBREAKPROC16: @@ -5208,7 +5217,7 @@ case WM_GETDLGCODE: result = DLGC_HASSETSEL | DLGC_WANTCHARS | DLGC_WANTARROWS; - + if (es->style & ES_MULTILINE) result |= DLGC_WANTALLKEYS; @@ -5483,12 +5492,12 @@ case WM_IME_CONTROL: break; - + default: result = DefWindowProcT(hwnd, msg, wParam, lParam, unicode); break; } - + if (es) EDIT_UnlockBuffer(es, FALSE); TRACE("hwnd=%p msg=%x (%s) -- 0x%08lx\n", hwnd, msg, SPY_GetMsgName(msg, hwnd), result);
15 years, 2 months
1
0
0
0
[tkreuzer] 43538: disable ROS_LONG64 hack for amd64
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Oct 17 21:19:22 2009 New Revision: 43538 URL:
http://svn.reactos.org/svn/reactos?rev=43538&view=rev
Log: disable ROS_LONG64 hack for amd64 Modified: trunk/reactos/include/psdk/winnt.h Modified: trunk/reactos/include/psdk/winnt.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winnt.h?rev=4…
============================================================================== --- trunk/reactos/include/psdk/winnt.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/winnt.h [iso-8859-1] Sat Oct 17 21:19:22 2009 @@ -106,7 +106,7 @@ #endif typedef char CHAR; typedef short SHORT; -#ifndef __ROS_LONG64__ +#if !defined(__ROS_LONG64__) || defined(_M_AMD64) typedef long LONG; #else typedef int LONG; @@ -3278,8 +3278,8 @@ ULONGLONG Alignment; struct { SLIST_ENTRY Next; - WORD Depth; - WORD Sequence; + USHORT Depth; + USHORT Sequence; } DUMMYSTRUCTNAME; } SLIST_HEADER, *PSLIST_HEADER; #endif
15 years, 2 months
1
0
0
0
[tkreuzer] 43537: Merge 41030 from amd64 branch
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Oct 17 21:16:01 2009 New Revision: 43537 URL:
http://svn.reactos.org/svn/reactos?rev=43537&view=rev
Log: Merge 41030 from amd64 branch Modified: trunk/reactos/include/ddk/wdm.h trunk/reactos/include/psdk/winnt.h Modified: trunk/reactos/include/ddk/wdm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/wdm.h?rev=4353…
============================================================================== --- trunk/reactos/include/ddk/wdm.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/wdm.h [iso-8859-1] Sat Oct 17 21:16:01 2009 @@ -573,7 +573,7 @@ #define PSLIST_ENTRY PSINGLE_LIST_ENTRY #if defined(_WIN64) -typedef union _SLIST_HEADER { +typedef union DECLSPEC_ALIGN(16) _SLIST_HEADER { struct { ULONGLONG Alignment; ULONGLONG Region; Modified: trunk/reactos/include/psdk/winnt.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winnt.h?rev=4…
============================================================================== --- trunk/reactos/include/psdk/winnt.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/winnt.h [iso-8859-1] Sat Oct 17 21:16:01 2009 @@ -3239,20 +3239,53 @@ struct _SINGLE_LIST_ENTRY *Next; } SINGLE_LIST_ENTRY,*PSINGLE_LIST_ENTRY; +// +// Slist Header +// #ifndef _SLIST_HEADER_ #define _SLIST_HEADER_ + #define SLIST_ENTRY SINGLE_LIST_ENTRY #define _SLIST_ENTRY _SINGLE_LIST_ENTRY #define PSLIST_ENTRY PSINGLE_LIST_ENTRY + +#if defined(_WIN64) +typedef union DECLSPEC_ALIGN(16) _SLIST_HEADER { + struct { + ULONGLONG Alignment; + ULONGLONG Region; + } DUMMYSTRUCTNAME; + struct { + ULONGLONG Depth:16; + ULONGLONG Sequence:9; + ULONGLONG NextEntry:39; + ULONGLONG HeaderType:1; + ULONGLONG Init:1; + ULONGLONG Reserved:59; + ULONGLONG Region:3; + } Header8; + struct { + ULONGLONG Depth:16; + ULONGLONG Sequence:48; + ULONGLONG HeaderType:1; + ULONGLONG Init:1; + ULONGLONG Reserved:2; + ULONGLONG NextEntry:60; + } Header16; +} SLIST_HEADER, *PSLIST_HEADER; +#else typedef union _SLIST_HEADER { - ULONGLONG Alignment; - _ANONYMOUS_STRUCT struct { - SLIST_ENTRY Next; - WORD Depth; - WORD Sequence; - } DUMMYSTRUCTNAME; -} SLIST_HEADER,*PSLIST_HEADER; -#endif /* !_SLIST_HEADER_ */ + ULONGLONG Alignment; + struct { + SLIST_ENTRY Next; + WORD Depth; + WORD Sequence; + } DUMMYSTRUCTNAME; +} SLIST_HEADER, *PSLIST_HEADER; +#endif + +#endif /* _SLIST_HEADER_ */ + NTSYSAPI VOID
15 years, 2 months
1
0
0
0
[cwittich] 43536: [Shell32]: in shell view, use the expected value for the effect in Drag & Drop operation patch by <eric dot pouech at orange dot fr>
by cwittich@svn.reactos.org
Author: cwittich Date: Sat Oct 17 21:15:04 2009 New Revision: 43536 URL:
http://svn.reactos.org/svn/reactos?rev=43536&view=rev
Log: [Shell32]: in shell view, use the expected value for the effect in Drag & Drop operation patch by <eric dot pouech at orange dot fr> Modified: trunk/reactos/dll/win32/shell32/shlview.c Modified: trunk/reactos/dll/win32/shell32/shlview.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shlview.…
============================================================================== --- trunk/reactos/dll/win32/shell32/shlview.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shlview.c [iso-8859-1] Sat Oct 17 21:15:04 2009 @@ -1450,8 +1450,8 @@ if (pds) { - DWORD dwEffect; - DoDragDrop(pda, pds, dwEffect, &dwEffect); + DWORD dwEffect2; + DoDragDrop(pda, pds, dwEffect, &dwEffect2); } IDataObject_Release(pda); }
15 years, 2 months
1
0
0
0
[fireball] 43535: - Properly remove mouse pointer.
by fireball@svn.reactos.org
Author: fireball Date: Sat Oct 17 20:53:14 2009 New Revision: 43535 URL:
http://svn.reactos.org/svn/reactos?rev=43535&view=rev
Log: - Properly remove mouse pointer. Modified: branches/arwinss/reactos/subsystems/win32/win32k/main/cursor.c Modified: branches/arwinss/reactos/subsystems/win32/win32k/main/cursor.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/main/cursor.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/main/cursor.c [iso-8859-1] Sat Oct 17 20:53:14 2009 @@ -114,6 +114,13 @@ ICONINFO IconInfo; NTSTATUS Status = STATUS_SUCCESS; + /* Special case for removing a pointer */ + if (!IconInfoUnsafe) + { + GreSetCursor(NULL, &CursorInfo); + return; + } + _SEH2_TRY { ProbeForRead(IconInfoUnsafe, sizeof(ICONINFO), 1);
15 years, 2 months
1
0
0
0
[tkreuzer] 43534: build kdcom for amd64, too
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Oct 17 18:34:07 2009 New Revision: 43534 URL:
http://svn.reactos.org/svn/reactos?rev=43534&view=rev
Log: build kdcom for amd64, too Modified: trunk/reactos/drivers/base/kdcom/kdcom.rbuild Modified: trunk/reactos/drivers/base/kdcom/kdcom.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/kdcom/kdcom.r…
============================================================================== --- trunk/reactos/drivers/base/kdcom/kdcom.rbuild [iso-8859-1] (original) +++ trunk/reactos/drivers/base/kdcom/kdcom.rbuild [iso-8859-1] Sat Oct 17 18:34:07 2009 @@ -16,4 +16,9 @@ <file>kdbg.c</file> </directory> </if> + <if property="ARCH" value="amd64"> + <directory name="i386"> + <file>kdbg.c</file> + </directory> + </if> </module>
15 years, 2 months
1
0
0
0
[janderwald] 43533: - Quick & dirty implementation of WIDM_RESET / WODM_RESET
by janderwald@svn.reactos.org
Author: janderwald Date: Sat Oct 17 17:08:01 2009 New Revision: 43533 URL:
http://svn.reactos.org/svn/reactos?rev=43533&view=rev
Log: - Quick & dirty implementation of WIDM_RESET / WODM_RESET Modified: trunk/reactos/lib/drivers/sound/mmebuddy/wave/streaming.c Modified: trunk/reactos/lib/drivers/sound/mmebuddy/wave/streaming.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/sound/mmebuddy…
============================================================================== --- trunk/reactos/lib/drivers/sound/mmebuddy/wave/streaming.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/sound/mmebuddy/wave/streaming.c [iso-8859-1] Sat Oct 17 17:08:01 2009 @@ -64,6 +64,10 @@ { HeaderExtension = (PWAVEHDR_EXTENSION) Header->reserved; SND_ASSERT( HeaderExtension ); + + /* Saniy checks */ + SND_ASSERT(Header->dwFlags & WHDR_PREPARED); + SND_ASSERT(Header->dwFlags & WHDR_INQUEUE); /* Can never be *above* the length */ SND_ASSERT( HeaderExtension->BytesCommitted <= Header->dwBufferLength ); @@ -170,6 +174,8 @@ WaveHdr = (PWAVEHDR) SoundOverlapped->Header; SND_ASSERT( WaveHdr ); + SND_ASSERT( ERROR_SUCCESS == dwErrorCode ); + HdrExtension = (PWAVEHDR_EXTENSION) WaveHdr->reserved; SND_ASSERT( HdrExtension ); @@ -239,8 +245,13 @@ IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, IN PVOID Parameter) { - /* TODO */ - return MMSYSERR_NOTSUPPORTED; + /* complete all pending headers */ + while(SoundDeviceInstance->HeadWaveHeader) + CompleteWaveHeader(SoundDeviceInstance, SoundDeviceInstance->HeadWaveHeader); + + SND_ASSERT( NULL == SoundDeviceInstance->HeadWaveHeader ); + SND_ASSERT( NULL == SoundDeviceInstance->TailWaveHeader ); + return MMSYSERR_NOERROR; } MMRESULT @@ -262,8 +273,7 @@ if ( ! MMSUCCESS(Result) ) return TranslateInternalMmResult(Result); - /* FIXME: What about wave input? */ - if ( DeviceType != WAVE_OUT_DEVICE_TYPE ) + if ( DeviceType != WAVE_OUT_DEVICE_TYPE && DeviceType != WAVE_IN_DEVICE_TYPE ) return MMSYSERR_NOTSUPPORTED; return CallSoundThread(SoundDeviceInstance,
15 years, 2 months
1
0
0
0
[sginsberg] 43532: - ntdll: Remove deprecated LdrpLoadUserModuleSymbols that doesn't actually do anything since the hack in NtSystemDebugControl was removed almost 3 years ago. - Cc: Remove weird check for DBG or KDBG -- debug code should always be wrapped under #if DBG.
by sginsberg@svn.reactos.org
Author: sginsberg Date: Sat Oct 17 17:03:54 2009 New Revision: 43532 URL:
http://svn.reactos.org/svn/reactos?rev=43532&view=rev
Log: - ntdll: Remove deprecated LdrpLoadUserModuleSymbols that doesn't actually do anything since the hack in NtSystemDebugControl was removed almost 3 years ago. - Cc: Remove weird check for DBG or KDBG -- debug code should always be wrapped under #if DBG. Modified: trunk/reactos/dll/ntdll/include/ntdllp.h trunk/reactos/dll/ntdll/ldr/startup.c trunk/reactos/dll/ntdll/ldr/utils.c trunk/reactos/ntoskrnl/cc/view.c trunk/reactos/ntoskrnl/include/internal/cc.h Modified: trunk/reactos/dll/ntdll/include/ntdllp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/include/ntdllp.h…
============================================================================== --- trunk/reactos/dll/ntdll/include/ntdllp.h [iso-8859-1] (original) +++ trunk/reactos/dll/ntdll/include/ntdllp.h [iso-8859-1] Sat Oct 17 17:03:54 2009 @@ -28,10 +28,6 @@ ULONG ul_reason_for_call, LPVOID lpReserved); -#if defined(KDBG) || DBG -VOID -LdrpLoadUserModuleSymbols(PLDR_DATA_TABLE_ENTRY LdrModule); -#endif extern HANDLE WindowsApiPort; /* EOF */ Modified: trunk/reactos/dll/ntdll/ldr/startup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/ldr/startup.c?re…
============================================================================== --- trunk/reactos/dll/ntdll/ldr/startup.c [iso-8859-1] (original) +++ trunk/reactos/dll/ntdll/ldr/startup.c [iso-8859-1] Sat Oct 17 17:03:54 2009 @@ -428,12 +428,6 @@ InsertTailList(&Peb->Ldr->InInitializationOrderModuleList, &NtModule->InInitializationOrderModuleList); -#if DBG || defined(KDBG) - - LdrpLoadUserModuleSymbols(NtModule); - -#endif /* DBG || KDBG */ - /* add entry for executable (becomes first list entry) */ ExeModule = (PLDR_DATA_TABLE_ENTRY) RtlAllocateHeap(Peb->ProcessHeap, @@ -477,12 +471,6 @@ &ExeModule->InLoadOrderLinks); LdrpInitLoader(); - -#if DBG || defined(KDBG) - - LdrpLoadUserModuleSymbols(ExeModule); - -#endif /* DBG || KDBG */ EntryPoint = LdrPEStartup((PVOID)ImageBase, NULL, NULL, NULL); ExeModule->EntryPoint = EntryPoint; Modified: trunk/reactos/dll/ntdll/ldr/utils.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/ldr/utils.c?rev=…
============================================================================== --- trunk/reactos/dll/ntdll/ldr/utils.c [iso-8859-1] (original) +++ trunk/reactos/dll/ntdll/ldr/utils.c [iso-8859-1] Sat Oct 17 17:03:54 2009 @@ -62,22 +62,6 @@ static VOID LdrpDetachProcess(BOOLEAN UnloadAll); /* FUNCTIONS *****************************************************************/ - -#if DBG || defined(KDBG) - -VOID -LdrpLoadUserModuleSymbols(PLDR_DATA_TABLE_ENTRY LdrModule) -{ - NtSystemDebugControl( - SysDbgQueryVersion, - (PVOID)LdrModule, - 0, - NULL, - 0, - NULL); -} - -#endif /* DBG || KDBG */ BOOLEAN LdrMappedAsDataFile(PVOID *BaseAddress) @@ -2268,9 +2252,7 @@ DPRINT1("LdrFixupImports failed for %wZ, status=%x\n", &(*Module)->BaseDllName, Status); return Status; } -#if DBG || defined(KDBG) - LdrpLoadUserModuleSymbols(*Module); -#endif /* DBG || KDBG */ + RtlEnterCriticalSection(NtCurrentPeb()->LoaderLock); InsertTailList(&NtCurrentPeb()->Ldr->InInitializationOrderModuleList, &(*Module)->InInitializationOrderModuleList); Modified: trunk/reactos/ntoskrnl/cc/view.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cc/view.c?rev=435…
============================================================================== --- trunk/reactos/ntoskrnl/cc/view.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/cc/view.c [iso-8859-1] Sat Oct 17 17:03:54 2009 @@ -70,7 +70,7 @@ static NPAGED_LOOKASIDE_LIST BcbLookasideList; static NPAGED_LOOKASIDE_LIST CacheSegLookasideList; -#if DBG || defined(KDBG) +#if DBG static void CcRosCacheSegmentIncRefCount_ ( PCACHE_SEGMENT cs, const char* file, int line ) { ++cs->ReferenceCount; @@ -108,7 +108,7 @@ PBCB Bcb, BOOLEAN Trace ) { -#if DBG || defined(KDBG) +#if DBG KIRQL oldirql; PLIST_ENTRY current_entry; PCACHE_SEGMENT current; @@ -587,7 +587,7 @@ current->PageOut = FALSE; current->FileOffset = ROUND_DOWN(FileOffset, Bcb->CacheSegmentSize); current->Bcb = Bcb; -#if DBG || defined(KDBG) +#if DBG if ( Bcb->Trace ) { DPRINT1("CacheMap 0x%p: new Cache Segment: 0x%p\n", Bcb, current ); @@ -619,7 +619,7 @@ { CcRosCacheSegmentIncRefCount(current); KeReleaseSpinLock(&Bcb->BcbLock, oldIrql); -#if DBG || defined(KDBG) +#if DBG if ( Bcb->Trace ) { DPRINT1("CacheMap 0x%p: deleting newly created Cache Segment 0x%p ( found existing one 0x%p )\n", @@ -865,7 +865,7 @@ KIRQL oldIrql; #endif DPRINT("Freeing cache segment 0x%p\n", CacheSeg); -#if DBG || defined(KDBG) +#if DBG if ( CacheSeg->Bcb->Trace ) { DPRINT1("CacheMap 0x%p: deleting Cache Segment: 0x%p\n", CacheSeg->Bcb, CacheSeg ); @@ -1065,7 +1065,7 @@ } InsertHeadList(&FreeList, ¤t->BcbSegmentListEntry); } -#if DBG || defined(KDBG) +#if DBG Bcb->Trace = FALSE; #endif KeReleaseSpinLock(&Bcb->BcbLock, oldIrql); Modified: trunk/reactos/ntoskrnl/include/internal/cc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/cc.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/cc.h [iso-8859-1] Sat Oct 17 17:03:54 2009 @@ -116,7 +116,7 @@ PVOID LazyWriteContext; KSPIN_LOCK BcbLock; ULONG RefCount; -#if DBG || defined(KDBG) +#if DBG BOOLEAN Trace; /* enable extra trace output for this BCB and it's cache segments */ #endif } BCB, *PBCB;
15 years, 2 months
1
0
0
0
[hpoussin] 43531: Fix warning
by hpoussin@svn.reactos.org
Author: hpoussin Date: Sat Oct 17 16:55:50 2009 New Revision: 43531 URL:
http://svn.reactos.org/svn/reactos?rev=43531&view=rev
Log: Fix warning Modified: trunk/reactos/boot/freeldr/freeldr/fs/fat.c Modified: trunk/reactos/boot/freeldr/freeldr/fs/fat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/fs/fa…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/fs/fat.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/fs/fat.c [iso-8859-1] Sat Oct 17 16:55:50 2009 @@ -796,7 +796,7 @@ // // Check if current entry is a directory // - if (!FatFileInfo.Attributes & ATTR_DIRECTORY) + if (!(FatFileInfo.Attributes & ATTR_DIRECTORY)) { MmFreeMemory(FatFileInfo.FileFatChain); return ENOTDIR;
15 years, 2 months
1
0
0
0
[sginsberg] 43530: - Add STATUS_SUCCESS to asm.h and make use of it. - Implement Bus and I/O space read and write support. - Implement support for AUTOENABLE, DISABLE and NOUMEX subparameters to /debug. Add the missing string scan and set and respect the related globals properly. Add support for disabling the debugger and suspending breakpoints. - Add and implement KdIsThisAKdTrap to determine if the kernel debugger can't ignore a particular trap -- returns true for software breakpoints and debu
by sginsberg@svn.reactos.org
Author: sginsberg Date: Sat Oct 17 16:31:38 2009 New Revision: 43530 URL:
http://svn.reactos.org/svn/reactos?rev=43530&view=rev
Log: - Add STATUS_SUCCESS to asm.h and make use of it. - Implement Bus and I/O space read and write support. - Implement support for AUTOENABLE, DISABLE and NOUMEX subparameters to /debug. Add the missing string scan and set and respect the related globals properly. Add support for disabling the debugger and suspending breakpoints. - Add and implement KdIsThisAKdTrap to determine if the kernel debugger can't ignore a particular trap -- returns true for software breakpoints and debug service calls (DbgPrint for example). Called from KiDispatchException to determine whether to override NOUMEX (otherwise, DbgPrint and friends will kill user mode applications). Stub this for KDBG as it implements its own scheme for ignoring user mode. - KiDispatchException: Clean up some goto and support NOUMEX. Also don't check if KiDebugRoutine is NULL -- it will never be. - KdEnableDebuggerWithLock should initialize the debugger even if KdDisableCount is 0 (but only if called internally) as this means that the debugger was never initialized in the first place. Required for AUTOENABLE and for enabling the debugger during a bugcheck. Add the globals to kdbg too but don't set or respect them there as kdbg does not support it. - Enable KdEnableDebugger and implement KdDisableDebugger for KD as KdDisableDebuggerWithLock is now implemented. - Only build kdmemsup.c if KDBG is defined. Modified: trunk/reactos/include/ndk/i386/asm.h trunk/reactos/ntoskrnl/include/internal/kd.h trunk/reactos/ntoskrnl/include/internal/kd64.h trunk/reactos/ntoskrnl/kd/kdmain.c trunk/reactos/ntoskrnl/kd64/amd64/kdsup.c trunk/reactos/ntoskrnl/kd64/arm/kdsup.c trunk/reactos/ntoskrnl/kd64/i386/kdsup.c trunk/reactos/ntoskrnl/kd64/kdapi.c trunk/reactos/ntoskrnl/kd64/kdbreak.c trunk/reactos/ntoskrnl/kd64/kddata.c trunk/reactos/ntoskrnl/kd64/kdinit.c trunk/reactos/ntoskrnl/kd64/kdtrap.c trunk/reactos/ntoskrnl/ke/i386/exp.c trunk/reactos/ntoskrnl/ke/i386/trap.s trunk/reactos/ntoskrnl/ntoskrnl-generic.rbuild Modified: trunk/reactos/include/ndk/i386/asm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/i386/asm.h?rev…
============================================================================== --- trunk/reactos/include/ndk/i386/asm.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/i386/asm.h [iso-8859-1] Sat Oct 17 16:31:38 2009 @@ -527,6 +527,7 @@ // NTSTATUS, Bugcheck Codes and Debug Codes // #ifdef __ASM__ +#define STATUS_SUCCESS 0x00000000 #define STATUS_ACCESS_VIOLATION 0xC0000005 #define STATUS_IN_PAGE_ERROR 0xC0000006 #define STATUS_GUARD_PAGE_VIOLATION 0x80000001 Modified: trunk/reactos/ntoskrnl/include/internal/kd.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/kd.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/kd.h [iso-8859-1] Sat Oct 17 16:31:38 2009 @@ -22,6 +22,7 @@ extern BOOLEAN _KdDebuggerNotPresent; extern BOOLEAN KdBreakAfterSymbolLoad; extern BOOLEAN KdPitchDebugger; +extern BOOLEAN KdIgnoreUmExceptions; BOOLEAN NTAPI @@ -131,6 +132,14 @@ PEXCEPTION_RECORD ExceptionRecord, PCONTEXT Context, PKTRAP_FRAME TrapFrame +); + +BOOLEAN +NTAPI +KdIsThisAKdTrap( + IN PEXCEPTION_RECORD ExceptionRecord, + IN PCONTEXT Context, + IN KPROCESSOR_MODE PreviousMode ); /* INIT ROUTINES *************************************************************/ Modified: trunk/reactos/ntoskrnl/include/internal/kd64.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/kd64.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/kd64.h [iso-8859-1] Sat Oct 17 16:31:38 2009 @@ -72,6 +72,17 @@ ); // +// Determines if the kernel debugger must handle a particular trap +// +BOOLEAN +NTAPI +KdIsThisAKdTrap( + IN PEXCEPTION_RECORD ExceptionRecord, + IN PCONTEXT Context, + IN KPROCESSOR_MODE PreviousMode +); + +// // Multi-Processor Switch Support // BOOLEAN @@ -147,7 +158,7 @@ ); // -// Debugger Enable, Enter and Exit +// Debugger Enter, Exit, Enable and Disable // BOOLEAN NTAPI @@ -165,6 +176,12 @@ NTSTATUS NTAPI KdEnableDebuggerWithLock( + IN BOOLEAN NeedLock +); + +NTSTATUS +NTAPI +KdDisableDebuggerWithLock( IN BOOLEAN NeedLock ); @@ -242,10 +259,10 @@ // // Breakpoint Support // -VOID -NTAPI -KdpRestoreAllBreakpoints( - VOID +ULONG +NTAPI +KdpAddBreakpoint( + IN PVOID Address ); BOOLEAN @@ -261,10 +278,22 @@ IN PVOID Limit ); -ULONG -NTAPI -KdpAddBreakpoint( - IN PVOID Address +VOID +NTAPI +KdpSuspendBreakPoint( + IN ULONG BpEntry +); + +VOID +NTAPI +KdpRestoreAllBreakpoints( + VOID +); + +VOID +NTAPI +KdpSuspendAllBreakPoints( + VOID ); // @@ -323,8 +352,8 @@ IN ULONG BusDataType, IN ULONG BusNumber, IN ULONG SlotNumber, + IN ULONG Offset, IN PVOID Buffer, - IN ULONG Offset, IN ULONG Length, OUT PULONG ActualLength ); @@ -335,8 +364,8 @@ IN ULONG BusDataType, IN ULONG BusNumber, IN ULONG SlotNumber, + IN ULONG Offset, IN PVOID Buffer, - IN ULONG Offset, IN ULONG Length, OUT PULONG ActualLength ); @@ -428,6 +457,8 @@ extern BOOLEAN _KdDebuggerNotPresent; extern BOOLEAN _KdDebuggerEnabled; extern BOOLEAN KdAutoEnableOnEvent; +extern BOOLEAN KdBlockEnable; +extern BOOLEAN KdIgnoreUmExceptions; extern BOOLEAN KdPreviouslyEnabled; extern BOOLEAN KdpDebuggerStructuresInitialized; extern BOOLEAN KdEnteredDebugger; Modified: trunk/reactos/ntoskrnl/kd/kdmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd/kdmain.c?rev=4…
============================================================================== --- trunk/reactos/ntoskrnl/kd/kdmain.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd/kdmain.c [iso-8859-1] Sat Oct 17 16:31:38 2009 @@ -18,8 +18,9 @@ BOOLEAN KdDebuggerNotPresent = TRUE; BOOLEAN KiEnableTimerWatchdog = FALSE; BOOLEAN KdBreakAfterSymbolLoad = FALSE; -BOOLEAN KdpBreakPending; +BOOLEAN KdpBreakPending = FALSE; BOOLEAN KdPitchDebugger = TRUE; +BOOLEAN KdIgnoreUmExceptions = FALSE; VOID NTAPI PspDumpThreads(BOOLEAN SystemThreads); typedef struct @@ -200,6 +201,16 @@ return TRUE; } +BOOLEAN +NTAPI +KdIsThisAKdTrap(IN PEXCEPTION_RECORD ExceptionRecord, + IN PCONTEXT Context, + IN KPROCESSOR_MODE PreviousMode) +{ + /* KDBG has its own mechanism for ignoring user mode exceptions */ + return FALSE; +} + /* PUBLIC FUNCTIONS *********************************************************/ /* Modified: trunk/reactos/ntoskrnl/kd64/amd64/kdsup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/amd64/kdsup.…
============================================================================== --- trunk/reactos/ntoskrnl/kd64/amd64/kdsup.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd64/amd64/kdsup.c [iso-8859-1] Sat Oct 17 16:31:38 2009 @@ -68,8 +68,8 @@ KdpSysReadBusData(IN ULONG BusDataType, IN ULONG BusNumber, IN ULONG SlotNumber, + IN ULONG Offset, IN PVOID Buffer, - IN ULONG Offset, IN ULONG Length, OUT PULONG ActualLength) { @@ -83,8 +83,8 @@ KdpSysWriteBusData(IN ULONG BusDataType, IN ULONG BusNumber, IN ULONG SlotNumber, + IN ULONG Offset, IN PVOID Buffer, - IN ULONG Offset, IN ULONG Length, OUT PULONG ActualLength) { Modified: trunk/reactos/ntoskrnl/kd64/arm/kdsup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/arm/kdsup.c?…
============================================================================== --- trunk/reactos/ntoskrnl/kd64/arm/kdsup.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd64/arm/kdsup.c [iso-8859-1] Sat Oct 17 16:31:38 2009 @@ -68,8 +68,8 @@ KdpSysReadBusData(IN ULONG BusDataType, IN ULONG BusNumber, IN ULONG SlotNumber, + IN ULONG Offset, IN PVOID Buffer, - IN ULONG Offset, IN ULONG Length, OUT PULONG ActualLength) { @@ -83,8 +83,8 @@ KdpSysWriteBusData(IN ULONG BusDataType, IN ULONG BusNumber, IN ULONG SlotNumber, + IN ULONG Offset, IN PVOID Buffer, - IN ULONG Offset, IN ULONG Length, OUT PULONG ActualLength) { Modified: trunk/reactos/ntoskrnl/kd64/i386/kdsup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/i386/kdsup.c…
============================================================================== --- trunk/reactos/ntoskrnl/kd64/i386/kdsup.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd64/i386/kdsup.c [iso-8859-1] Sat Oct 17 16:31:38 2009 @@ -11,9 +11,6 @@ #include <ntoskrnl.h> #define NDEBUG #include <debug.h> - -#undef UNIMPLEMENTED -#define UNIMPLEMENTED KdpDprintf("%s is unimplemented\n", __FUNCTION__) /* FUNCTIONS *****************************************************************/ @@ -148,14 +145,21 @@ KdpSysReadBusData(IN ULONG BusDataType, IN ULONG BusNumber, IN ULONG SlotNumber, + IN ULONG Offset, IN PVOID Buffer, - IN ULONG Offset, IN ULONG Length, OUT PULONG ActualLength) { - UNIMPLEMENTED; - while (TRUE); - return STATUS_UNSUCCESSFUL; + /* Just forward to HAL */ + *ActualLength = HalGetBusDataByOffset(BusDataType, + BusNumber, + SlotNumber, + Buffer, + Offset, + Length); + + /* Return status */ + return (*ActualLength != 0) ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL; } NTSTATUS @@ -163,14 +167,21 @@ KdpSysWriteBusData(IN ULONG BusDataType, IN ULONG BusNumber, IN ULONG SlotNumber, + IN ULONG Offset, IN PVOID Buffer, - IN ULONG Offset, IN ULONG Length, OUT PULONG ActualLength) { - UNIMPLEMENTED; - while (TRUE); - return STATUS_UNSUCCESSFUL; + /* Just forward to HAL */ + *ActualLength = HalSetBusDataByOffset(BusDataType, + BusNumber, + SlotNumber, + Buffer, + Offset, + Length); + + /* Return status */ + return (*ActualLength != 0) ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL; } NTSTATUS @@ -185,7 +196,7 @@ ULONG RealLength; /* Make sure that this is a valid request */ - if (((ULONG)BaseAddress < sizeof(KPROCESSOR_STATE)) && + if ((BaseAddress < sizeof(KPROCESSOR_STATE)) && (Processor < KeNumberProcessors)) { /* Get the actual length */ @@ -223,7 +234,7 @@ PVOID ControlStart; /* Make sure that this is a valid request */ - if ((((ULONG)BaseAddress + Length) <= sizeof(KPROCESSOR_STATE)) && + if (((BaseAddress + Length) <= sizeof(KPROCESSOR_STATE)) && (Processor < KeNumberProcessors)) { /* Set the proper address */ @@ -256,9 +267,75 @@ IN ULONG DataSize, OUT PULONG ActualDataSize) { - UNIMPLEMENTED; - while (TRUE); - return STATUS_UNSUCCESSFUL; + NTSTATUS Status; + + /* Verify parameters */ + if ((InterfaceType != Isa) || + (BusNumber != 0) || + (AddressSpace != 1)) + { + /* Fail, we don't support this */ + *ActualDataSize = 0; + return STATUS_UNSUCCESSFUL; + } + + /* Check the size */ + switch (DataSize) + { + case sizeof(UCHAR): + + /* Read 1 byte */ + *(PUCHAR)DataValue = + READ_PORT_UCHAR((PUCHAR)(ULONG_PTR)IoAddress); + *ActualDataSize = sizeof(UCHAR); + Status = STATUS_SUCCESS; + break; + + case sizeof(USHORT): + + /* Make sure the address is aligned */ + if ((IoAddress & (sizeof(USHORT) - 1)) != 0) + { + /* It isn't, bail out */ + *ActualDataSize = 0; + Status = STATUS_DATATYPE_MISALIGNMENT; + break; + } + + /* Read 2 bytes */ + *(PUSHORT)DataValue = + READ_PORT_USHORT((PUSHORT)(ULONG_PTR)IoAddress); + *ActualDataSize = sizeof(USHORT); + Status = STATUS_SUCCESS; + break; + + case sizeof(ULONG): + + /* Make sure the address is aligned */ + if ((IoAddress & (sizeof(ULONG) - 1)) != 0) + { + /* It isn't, bail out */ + *ActualDataSize = 0; + Status = STATUS_DATATYPE_MISALIGNMENT; + break; + } + + /* Read 4 bytes */ + *(PULONG)DataValue = + READ_PORT_ULONG((PULONG)(ULONG_PTR)IoAddress); + *ActualDataSize = sizeof(ULONG); + Status = STATUS_SUCCESS; + break; + + default: + + /* Invalid size, fail */ + *ActualDataSize = 0; + Status = STATUS_INVALID_PARAMETER; + } + + /* Return status */ + return Status; } NTSTATUS @@ -271,16 +348,81 @@ IN ULONG DataSize, OUT PULONG ActualDataSize) { - UNIMPLEMENTED; - while (TRUE); + NTSTATUS Status; + + /* Verify parameters */ + if ((InterfaceType != Isa) || + (BusNumber != 0) || + (AddressSpace != 1)) + { + /* Fail, we don't support this */ + *ActualDataSize = 0; + return STATUS_UNSUCCESSFUL; + } + + /* Check the size */ + switch (DataSize) + { + case sizeof(UCHAR): + + /* Write 1 byte */ + WRITE_PORT_UCHAR((PUCHAR)(ULONG_PTR)IoAddress, + *(PUCHAR)DataValue); + *ActualDataSize = sizeof(UCHAR); + Status = STATUS_SUCCESS; + break; + + case sizeof(USHORT): + + /* Make sure the address is aligned */ + if ((IoAddress & (sizeof(USHORT) - 1)) != 0) + { + /* It isn't, bail out */ + *ActualDataSize = 0; + Status = STATUS_DATATYPE_MISALIGNMENT; + break; + } + + /* Write 2 bytes */ + WRITE_PORT_USHORT((PUSHORT)(ULONG_PTR)IoAddress, + *(PUSHORT)DataValue); + *ActualDataSize = sizeof(USHORT); + Status = STATUS_SUCCESS; + break; + + case sizeof(ULONG): + + /* Make sure the address is aligned */ + if ((IoAddress & (sizeof(ULONG) - 1)) != 0) + { + /* It isn't, bail out */ + *ActualDataSize = 0; + Status = STATUS_DATATYPE_MISALIGNMENT; + break; + } + + /* Write 4 bytes */ + WRITE_PORT_ULONG((PULONG)(ULONG_PTR)IoAddress, + *(PULONG)DataValue); + *ActualDataSize = sizeof(ULONG); + Status = STATUS_SUCCESS; + break; + + default: + + /* Invalid size, fail */ + *ActualDataSize = 0; + Status = STATUS_INVALID_PARAMETER; + } + + /* Return status */ + return Status; +} + +NTSTATUS +NTAPI +KdpSysCheckLowMemory(IN ULONG Flags) +{ + /* Stubbed as we don't support PAE */ return STATUS_UNSUCCESSFUL; } - -NTSTATUS -NTAPI -KdpSysCheckLowMemory(IN ULONG Flags) -{ - UNIMPLEMENTED; - while (TRUE); - return STATUS_UNSUCCESSFUL; -} Modified: trunk/reactos/ntoskrnl/kd64/kdapi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/kdapi.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/kd64/kdapi.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd64/kdapi.c [iso-8859-1] Sat Oct 17 16:31:38 2009 @@ -602,7 +602,7 @@ else { /* SMP not yet handled */ - KdpDprintf("SMP UNHANDLED\n"); + KdpDprintf("KdpGetContext: SMP UNHANDLED\n"); ControlStart = NULL; while (TRUE); } @@ -653,7 +653,7 @@ else { /* SMP not yet handled */ - KdpDprintf("SMP UNHANDLED\n"); + KdpDprintf("KdpSetContext: SMP UNHANDLED\n"); ControlStart = NULL; while (TRUE); } @@ -770,8 +770,8 @@ State->ReturnStatus = KdpSysReadBusData(GetBusData->BusDataType, GetBusData->BusNumber, GetBusData->SlotNumber, + GetBusData->Offset, Data->Buffer, - GetBusData->Offset, Length, &Length); @@ -803,8 +803,8 @@ State->ReturnStatus = KdpSysWriteBusData(SetBusData->BusDataType, SetBusData->BusNumber, SetBusData->SlotNumber, + SetBusData->Offset, Data->Buffer, - SetBusData->Offset, SetBusData->Length, &Length); @@ -1476,6 +1476,22 @@ return KeQueryPerformanceCounter(NULL); } +NTSTATUS +NTAPI +KdpAllowDisable(VOID) +{ + /* Check if we are on MP */ + if (KeNumberProcessors > 1) + { + /* TODO */ + KdpDprintf("KdpAllowDisable: SMP UNHANDLED\n"); + while (TRUE); + } + + /* Allow disable */ + return STATUS_SUCCESS; +} + BOOLEAN NTAPI KdEnterDebugger(IN PKTRAP_FRAME TrapFrame, @@ -1575,6 +1591,13 @@ OldIrql = PASSIVE_LEVEL; #endif + /* Check if enabling the debugger is blocked */ + if (KdBlockEnable) + { + /* It is, fail the enable */ + return STATUS_ACCESS_DENIED; + } + /* Check if we need to acquire the lock */ if (NeedLock) { @@ -1592,10 +1615,21 @@ /* Do the unlock */ KeLowerIrql(OldIrql); KdpPortUnlock(); - } - - /* Fail: We're already enabled */ - return STATUS_INVALID_PARAMETER; + + /* Fail: We're already enabled */ + return STATUS_INVALID_PARAMETER; + } + else + { + /* + * This can only happen if we are called from a bugcheck + * and were never initialized, so initialize the debugger now. + */ + KdInitSystem(0, NULL); + + /* Return success since we initialized */ + return STATUS_SUCCESS; + } } /* Decrease the disable count */ @@ -1609,6 +1643,98 @@ KdpRestoreAllBreakpoints(); } } + + /* Check if we had locked the port before */ + if (NeedLock) + { + /* Yes, now unlock it */ + KeLowerIrql(OldIrql); + KdpPortUnlock(); + } + + /* We're done */ + return STATUS_SUCCESS; +} + +NTSTATUS +NTAPI +KdDisableDebuggerWithLock(IN BOOLEAN NeedLock) +{ + KIRQL OldIrql; + NTSTATUS Status; + +#if defined(__GNUC__) + /* Make gcc happy */ + OldIrql = PASSIVE_LEVEL; +#endif + + /* + * If enabling the debugger is blocked + * then there is nothing to disable (duh) + */ + if (KdBlockEnable) + { + /* Fail */ + return STATUS_ACCESS_DENIED; + } + + /* Check if we need to acquire the lock */ + if (NeedLock) + { + /* Lock the port */ + KeRaiseIrql(DISPATCH_LEVEL, &OldIrql); + KdpPortLock(); + } + + /* Check if we're not disabled */ + if (!KdDisableCount) + { + /* Check if the debugger was never actually initialized */ + if (!(KdDebuggerEnabled) && !(KdPitchDebugger)) + { + /* It wasn't, so don't re-enable it later */ + KdPreviouslyEnabled = FALSE; + } + else + { + /* It was, so we will re-enable it later */ + KdPreviouslyEnabled = TRUE; + } + + /* Check if we were called from the exported API and are enabled */ + if ((NeedLock) && (KdPreviouslyEnabled)) + { + /* Check if it is safe to disable the debugger */ + Status = KdpAllowDisable(); + if (!NT_SUCCESS(Status)) + { + /* Release the lock and fail */ + KeLowerIrql(OldIrql); + KdpPortUnlock(); + return Status; + } + } + + /* Only disable the debugger if it is enabled */ + if (KdDebuggerEnabled) + { + /* + * Disable the debugger; suspend breakpoints + * and reset the debug stub + */ + KdpSuspendAllBreakPoints(); + KiDebugRoutine = KdpStub; + + /* We are disabled now */ + KdDebuggerEnabled = FALSE; +#undef KdDebuggerEnabled + SharedUserData->KdDebuggerEnabled = FALSE; +#define KdDebuggerEnabled _KdDebuggerEnabled + } + } + + /* Increment the disable count */ + KdDisableCount++; /* Check if we had locked the port before */ if (NeedLock) @@ -1632,9 +1758,18 @@ KdEnableDebugger(VOID) { /* Use the internal routine */ - KdpDprintf("KdEnableDebugger called\n"); - while (TRUE); return KdEnableDebuggerWithLock(TRUE); +} + +/* + * @implemented + */ +NTSTATUS +NTAPI +KdDisableDebugger(VOID) +{ + /* Use the internal routine */ + return KdDisableDebuggerWithLock(TRUE); } /* @@ -1684,17 +1819,6 @@ /* * @unimplemented */ -NTSTATUS -NTAPI -KdDisableDebugger(VOID) -{ - /* HACK */ - return STATUS_SUCCESS; -} - -/* - * @unimplemented - */ BOOLEAN NTAPI KdRefreshDebuggerNotPresent(VOID) @@ -1721,4 +1845,3 @@ /* HACK */ return STATUS_SUCCESS; } - Modified: trunk/reactos/ntoskrnl/kd64/kdbreak.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/kdbreak.c?re…
============================================================================== --- trunk/reactos/ntoskrnl/kd64/kdbreak.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd64/kdbreak.c [iso-8859-1] Sat Oct 17 16:31:38 2009 @@ -183,7 +183,7 @@ BreakpointsSuspended = FALSE; /* Loop the breakpoints */ - for (BpIndex = 0; BpIndex < KD_BREAKPOINT_MAX; BpIndex++ ) + for (BpIndex = 0; BpIndex < KD_BREAKPOINT_MAX; BpIndex++) { /* Check if they are valid, suspended breakpoints */ if ((KdpBreakpointTable[BpIndex].Flags & KdpBreakpointActive) && @@ -195,3 +195,36 @@ } } } + +VOID +NTAPI +KdpSuspendBreakPoint(IN ULONG BpEntry) +{ + ULONG BpIndex = BpEntry - 1; + + /* Check if this is a valid, unsuspended breakpoint */ + if ((KdpBreakpointTable[BpIndex].Flags & KdpBreakpointActive) && + !(KdpBreakpointTable[BpIndex].Flags & KdpBreakpointSuspended)) + { + /* Suspend it */ + KdpBreakpointTable[BpIndex].Flags |= KdpBreakpointSuspended; + KdpLowWriteContent(BpIndex); + } +} + +VOID +NTAPI +KdpSuspendAllBreakPoints(VOID) +{ + ULONG BpEntry; + + /* Breakpoints are suspended */ + BreakpointsSuspended = TRUE; + + /* Loop every breakpoint */ + for (BpEntry = 1; BpEntry <= KD_BREAKPOINT_MAX; BpEntry++) + { + /* Suspend it */ + KdpSuspendBreakPoint(BpEntry); + } +} Modified: trunk/reactos/ntoskrnl/kd64/kddata.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/kddata.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/kd64/kddata.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd64/kddata.c [iso-8859-1] Sat Oct 17 16:31:38 2009 @@ -68,6 +68,8 @@ BOOLEAN _KdDebuggerNotPresent; BOOLEAN _KdDebuggerEnabled; BOOLEAN KdAutoEnableOnEvent; +BOOLEAN KdBlockEnable; +BOOLEAN KdIgnoreUmExceptions; BOOLEAN KdPreviouslyEnabled; BOOLEAN KdpDebuggerStructuresInitialized; BOOLEAN KdEnteredDebugger; @@ -83,6 +85,9 @@ BOOLEAN BreakpointsSuspended; ULONG KdpNumInternalBreakpoints; +// +// Symbol Data +// ULONG KdpCurrentSymbolStart, KdpCurrentSymbolEnd; // Modified: trunk/reactos/ntoskrnl/kd64/kdinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/kdinit.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/kd64/kdinit.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd64/kdinit.c [iso-8859-1] Sat Oct 17 16:31:38 2009 @@ -72,14 +72,19 @@ KdInitSystem(IN ULONG BootPhase, IN PLOADER_PARAMETER_BLOCK LoaderBlock) { - BOOLEAN EnableKd; - LPSTR CommandLine, DebugLine; + BOOLEAN EnableKd, DisableKdAfterInit = FALSE, BlockEnable; + LPSTR CommandLine, DebugLine, DebugOptionStart, DebugOptionEnd; ANSI_STRING ImageName; PLDR_DATA_TABLE_ENTRY LdrEntry; PLIST_ENTRY NextEntry; - ULONG i, j, Length; + ULONG i, j, Length, DebugOptionLength; CHAR NameBuffer[256]; PWCHAR Name; + +#if defined(__GNUC__) + /* Make gcc happy */ + BlockEnable = FALSE; +#endif /* Check if this is Phase 1 */ if (BootPhase) @@ -166,10 +171,87 @@ /* Enable KD */ EnableKd = TRUE; - /* Check if there was additional data */ + /* Check if there are any options */ if (DebugLine[5] == '=') { - /* FIXME: Check for NOUMEX, DISABLE, AUTOENABLE */ + /* Save pointers */ + DebugOptionStart = DebugOptionEnd = &DebugLine[6]; + + /* Scan the string for debug options */ + for (;;) + { + /* Loop until we reach the end of the string */ + while (*DebugOptionEnd != ANSI_NULL) + { + /* Check if this is a comma, a space or a tab */ + if ((*DebugOptionEnd == ',') || + (*DebugOptionEnd == ' ') || + (*DebugOptionEnd == ' ')) + { + /* + * We reached the end of the option or + * the end of the string, break out + */ + break; + } + else + { + /* Move on to the next character */ + DebugOptionEnd++; + } + } + + /* Calculate the length of the current option */ + DebugOptionLength = ((ULONG_PTR)DebugOptionEnd - + (ULONG_PTR)DebugOptionStart); + + /* + * Break out if we reached the last option + * or if there were no options at all + */ + if (!DebugOptionLength) break; + + /* Now check which option this is */ + if ((DebugOptionLength == 10) && + !(strncmp(DebugOptionStart, "AUTOENABLE", 10))) + { + /* + * Disable the debugger, but + * allow it to be reenabled + */ + DisableKdAfterInit = TRUE; + BlockEnable = FALSE; + KdAutoEnableOnEvent = TRUE; + } + else if ((DebugOptionLength == 7) && + !(strncmp(DebugOptionStart, "DISABLE", 7))) + { + /* Disable the debugger */ + DisableKdAfterInit = TRUE; + BlockEnable = TRUE; + KdAutoEnableOnEvent = FALSE; + } + else if ((DebugOptionLength == 6) && + !(strncmp(DebugOptionStart, "NOUMEX", 6))) + { + /* Ignore user mode exceptions */ + KdIgnoreUmExceptions = TRUE; + } + + /* + * If there are more options then + * the next character should be a comma + */ + if (*DebugOptionEnd != ',') + { + /* It isn't, break out */ + break; + } + + /* Move on to the next option */ + DebugOptionEnd++; + DebugOptionStart = DebugOptionEnd; + } } } } @@ -182,7 +264,7 @@ } else { - /* Called from a bugcheck...Save the Kernel Base */ + /* Called from a bugcheck or a re-enable. Save the Kernel Base */ KdVersionBlock.KernBase = (ULONG64)(LONG_PTR)PsNtosImageBase; /* Unconditionally enable KD */ @@ -225,6 +307,20 @@ #undef KdDebuggerEnabled SharedUserData->KdDebuggerEnabled = TRUE; #define KdDebuggerEnabled _KdDebuggerEnabled + + /* Check if the debugger should be disabled initially */ + if (DisableKdAfterInit) + { + /* Disable it */ + KdDisableDebuggerWithLock(FALSE); + + /* + * Save the enable block state and return initialized + * (the debugger is active but disabled). + */ + KdBlockEnable = BlockEnable; + return TRUE; + } /* Check if we have a loader block */ if (LoaderBlock) Modified: trunk/reactos/ntoskrnl/kd64/kdtrap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/kdtrap.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/kd64/kdtrap.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd64/kdtrap.c [iso-8859-1] Sat Oct 17 16:31:38 2009 @@ -289,3 +289,24 @@ return FALSE; } } + +BOOLEAN +NTAPI +KdIsThisAKdTrap(IN PEXCEPTION_RECORD ExceptionRecord, + IN PCONTEXT Context, + IN KPROCESSOR_MODE PreviousMode) +{ + /* Check if this is a breakpoint or a valid debug service */ + if ((ExceptionRecord->ExceptionCode == STATUS_BREAKPOINT) && + (ExceptionRecord->NumberParameters > 0) && + (ExceptionRecord->ExceptionInformation[0] != BREAKPOINT_BREAK)) + { + /* Then we have to handle it */ + return TRUE; + } + else + { + /* We don't have to handle it */ + return FALSE; + } +} Modified: trunk/reactos/ntoskrnl/ke/i386/exp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/exp.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/exp.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/i386/exp.c [iso-8859-1] Sat Oct 17 16:31:38 2009 @@ -928,11 +928,19 @@ /* User mode exception, was it first-chance? */ if (FirstChance) { - /* Make sure a debugger is present, and ignore user-mode if requested */ - if ((KiDebugRoutine) && - (!(PsGetCurrentProcess()->DebugPort))) - { - /* Call the debugger */ + /* + * Break into the kernel debugger unless a user mode debugger + * is present or user mode exceptions are ignored, unless this is + * a breakpoint or a debug service in which case we have to + * handle it. + */ + if ((!(PsGetCurrentProcess()->DebugPort) && + !(KdIgnoreUmExceptions)) || + (KdIsThisAKdTrap(ExceptionRecord, + &Context, + PreviousMode))) + { + /* Call the kernel debugger */ if (KiDebugRoutine(TrapFrame, ExceptionFrame, ExceptionRecord, @@ -946,7 +954,7 @@ } /* Forward exception to user mode debugger */ - if (DbgkForwardException(ExceptionRecord, TRUE, FALSE)) goto Exit; + if (DbgkForwardException(ExceptionRecord, TRUE, FALSE)) return; /* Set up the user-stack */ DispatchToUser: @@ -1032,12 +1040,12 @@ if (DbgkForwardException(ExceptionRecord, TRUE, TRUE)) { /* Handled, get out */ - goto Exit; + return; } else if (DbgkForwardException(ExceptionRecord, FALSE, TRUE)) { /* Handled, get out */ - goto Exit; + return; } /* 3rd strike, kill the process */ @@ -1061,7 +1069,6 @@ TrapFrame, Context.ContextFlags, PreviousMode); -Exit: return; } Modified: trunk/reactos/ntoskrnl/ke/i386/trap.s URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/trap.s?re…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/trap.s [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/i386/trap.s [iso-8859-1] Sat Oct 17 16:31:38 2009 @@ -781,7 +781,7 @@ TRAP_PROLOG kit3_a, kit3_t /* Set status code */ - mov eax, 0 //STATUS_SUCCESS + mov eax, STATUS_SUCCESS /* Check for V86 */ PrepareInt3: Modified: trunk/reactos/ntoskrnl/ntoskrnl-generic.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntoskrnl-generic.…
============================================================================== --- trunk/reactos/ntoskrnl/ntoskrnl-generic.rbuild [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ntoskrnl-generic.rbuild [iso-8859-1] Sat Oct 17 16:31:38 2009 @@ -271,13 +271,15 @@ <file>pnproot.c</file> </directory> </directory> - <directory name="kd"> - <if property="ARCH" value="i386"> - <directory name="i386"> - <file>kdmemsup.c</file> - </directory> - </if> - </directory> + <if property="KDBG" value="1"> + <directory name="kd"> + <if property="ARCH" value="i386"> + <directory name="i386"> + <file>kdmemsup.c</file> + </directory> + </if> + </directory> + </if> <if property="_WINKD_" value="0"> <directory name="kdbg"> <if property="ARCH" value="i386">
15 years, 2 months
1
0
0
0
← Newer
1
...
33
34
35
36
37
38
39
...
65
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Results per page:
10
25
50
100
200