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
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
January 2019
----- 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
31 participants
300 discussions
Start a n
N
ew thread
[reactos] 01/01: [SPEC2DEF] Fix compilation of generated stub C files with int64 parameters
by Andrew Boyarshin
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3636b46dfd419942502ba…
commit 3636b46dfd419942502ba6ac51e9bd00744c789f Author: Andrew Boyarshin <andrew.boyarshin(a)gmail.com> AuthorDate: Sun Nov 25 14:45:49 2018 +0700 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Tue Jan 8 18:58:56 2019 +0100 [SPEC2DEF] Fix compilation of generated stub C files with int64 parameters --- sdk/include/reactos/stubs.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sdk/include/reactos/stubs.h b/sdk/include/reactos/stubs.h index d8c59c9fa5..21b85d492d 100644 --- a/sdk/include/reactos/stubs.h +++ b/sdk/include/reactos/stubs.h @@ -1,6 +1,10 @@ #define WIN32_NO_STATUS #include <windef.h> +#ifndef PRIx64 +#define PRIx64 "I64x" +#endif + #define EXCEPTION_WINE_STUB 0x80000100 #define EH_NONCONTINUABLE 0x01
5 years, 10 months
1
0
0
0
[reactos] 01/01: [TRANSLATION] Update Chinese translation. (#1227)
by Luo Yufan
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=980d8b1b121a8b44e2627…
commit 980d8b1b121a8b44e2627765f050f717d5a5750e Author: Luo Yufan <njlyf2011(a)hotmail.com> AuthorDate: Tue Jan 8 20:42:17 2019 +0800 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> CommitDate: Tue Jan 8 13:42:17 2019 +0100 [TRANSLATION] Update Chinese translation. (#1227) Update Chinese and Traditional Chinese translations. --- base/setup/reactos/lang/zh-TW.rc | 2 +- base/system/winlogon/lang/zh-TW.rc | 4 ++-- dll/cpl/inetcpl/lang/zh-TW.rc | 2 +- dll/win32/msgina/lang/zh-TW.rc | 2 +- dll/win32/setupapi/lang/zh-TW.rc | 2 +- dll/win32/shell32/lang/zh-CN.rc | 2 +- dll/win32/shell32/lang/zh-TW.rc | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/base/setup/reactos/lang/zh-TW.rc b/base/setup/reactos/lang/zh-TW.rc index aad01086b1..f203eec786 100644 --- a/base/setup/reactos/lang/zh-TW.rc +++ b/base/setup/reactos/lang/zh-TW.rc @@ -9,7 +9,7 @@ CAPTION "ReactOS 安裝程式" FONT 9, "新細明體" BEGIN LTEXT "歡迎使用 ReactOS 安裝程式精靈", IDC_STARTTITLE, 115, 8, 195, 24 - LTEXT "您不能直接從此 CD 安裝 ReactOS! 請重新啟動並從 CD 啟動您的電腦以便安裝 ReactOS。", IDC_STATIC, 115, 40, 195, 100 + LTEXT "您不能直接從此 CD 安裝 ReactOS! 請重新開機並從 CD 啟動您的電腦以便安裝 ReactOS。", IDC_STATIC, 115, 40, 195, 100 LTEXT "點選完成退出安裝程式。", IDC_STATIC, 115, 169, 195, 17 END diff --git a/base/system/winlogon/lang/zh-TW.rc b/base/system/winlogon/lang/zh-TW.rc index 694d6ca5f0..ec85740f90 100644 --- a/base/system/winlogon/lang/zh-TW.rc +++ b/base/system/winlogon/lang/zh-TW.rc @@ -9,7 +9,7 @@ FONT 9, "新細明體" BEGIN LTEXT "現在可以安全地關閉電腦了。", IDC_SHUTDOWNCOMPUTER, 31, 13, 132, 8 ICON IDI_WINLOGON, IDC_SHTDOWNICON, 6, 7, 18, 20 - DEFPUSHBUTTON "重新啟動(&R)", IDC_BTNSHTDOWNCOMPUTER, 62, 32, 68, 14 + DEFPUSHBUTTON "重新開機(&R)", IDC_BTNSHTDOWNCOMPUTER, 62, 32, 68, 14 END IDD_GINALOADFAILED DIALOGEX 58, 83, 231, 119 @@ -19,7 +19,7 @@ FONT 9, "新細明體" BEGIN LTEXT "載入登入使用者介面的 DLL 檔案 %s 失敗。", IDC_GINALOADFAILED, 39, 16, 156, 24 LTEXT "請與系統管理員聯繫,以替換 DLL 檔案,或還原原 DLL。", IDC_GINALOADFAILEDCONTACT, 39, 53, 151, 25 - DEFPUSHBUTTON "重新啟動(&R)", 1, 80, 91, 68, 14 + DEFPUSHBUTTON "重新開機(&R)", 1, 80, 91, 68, 14 END IDD_SYSSHUTDOWN DIALOGEX 50, 50, 180, 140 diff --git a/dll/cpl/inetcpl/lang/zh-TW.rc b/dll/cpl/inetcpl/lang/zh-TW.rc index 5776dc731c..108dbd0506 100644 --- a/dll/cpl/inetcpl/lang/zh-TW.rc +++ b/dll/cpl/inetcpl/lang/zh-TW.rc @@ -117,7 +117,7 @@ END IDD_CONNECTIONS DIALOG 0, 0, 320, 220 STYLE WS_CAPTION | WS_CHILD | WS_DISABLED FONT 9, "新細明體" -CAPTION "連結" +CAPTION "連線" BEGIN GROUPBOX "自動組態", IDC_STATIC, 4, 4, 312, 56 AUTOCHECKBOX "使用網路 Proxy 自動偵測 (WPAD)", IDC_USE_WPAD, 10, 14, 200, 14, BS_TOP diff --git a/dll/win32/msgina/lang/zh-TW.rc b/dll/win32/msgina/lang/zh-TW.rc index 91db6aa66d..0ee86535ce 100644 --- a/dll/win32/msgina/lang/zh-TW.rc +++ b/dll/win32/msgina/lang/zh-TW.rc @@ -208,7 +208,7 @@ STRINGTABLE BEGIN IDS_SHUTDOWN_LOGOFF "登出 ""%S""" IDS_SHUTDOWN_SHUTDOWN "關閉" - IDS_SHUTDOWN_RESTART "重新啟動" + IDS_SHUTDOWN_RESTART "重新開機" IDS_SHUTDOWN_SLEEP "睡眠狀態" IDS_SHUTDOWN_HIBERNATE "休眠狀態" /* Shut down descriptions */ diff --git a/dll/win32/setupapi/lang/zh-TW.rc b/dll/win32/setupapi/lang/zh-TW.rc index 4e6ac8f967..1aab15a18e 100644 --- a/dll/win32/setupapi/lang/zh-TW.rc +++ b/dll/win32/setupapi/lang/zh-TW.rc @@ -40,7 +40,7 @@ END STRINGTABLE BEGIN IDS_QUERY_REBOOT_TEXT "您的電腦需要重新啟動才能完成安裝。您要繼續嗎?" - IDS_QUERY_REBOOT_CAPTION "重新啟動" + IDS_QUERY_REBOOT_CAPTION "重新開機" IDS_INF_FILE "安裝程式資訊" END diff --git a/dll/win32/shell32/lang/zh-CN.rc b/dll/win32/shell32/lang/zh-CN.rc index b355bcc388..84342e6ce2 100644 --- a/dll/win32/shell32/lang/zh-CN.rc +++ b/dll/win32/shell32/lang/zh-CN.rc @@ -913,7 +913,7 @@ BEGIN IDS_ANY_FILE "%s-文件" IDS_OPEN_VERB "打开" - IDS_EXPLORE_VERB "浏览" + IDS_EXPLORE_VERB "资源管理器" IDS_RUNAS_VERB "运行方式..." IDS_EDIT_VERB "编辑" IDS_FIND_VERB "查找" diff --git a/dll/win32/shell32/lang/zh-TW.rc b/dll/win32/shell32/lang/zh-TW.rc index 916a6b247e..701cc6ca91 100644 --- a/dll/win32/shell32/lang/zh-TW.rc +++ b/dll/win32/shell32/lang/zh-TW.rc @@ -802,8 +802,8 @@ BEGIN IDS_FILEOOP_PREFLIGHT "Preflight" /* message box strings */ - IDS_RESTART_TITLE "重新啟動" - IDS_RESTART_PROMPT "您確定要重新啟動嗎?" + IDS_RESTART_TITLE "重新開機" + IDS_RESTART_PROMPT "您確定要重新開機嗎?" IDS_SHUTDOWN_TITLE "關機" IDS_SHUTDOWN_PROMPT "您確定要關機嗎?"
5 years, 10 months
1
0
0
0
[reactos] 01/01: [WIN32K:NTUSER] Avoid dereferencing a null pointer in NC_DoNCPaint. CORE-15569
by Thomas Faber
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b2dcb8e0d8925fc1aed2a…
commit b2dcb8e0d8925fc1aed2adeaf74ad0291e29f8f6 Author: Thomas Faber <thomas.faber(a)reactos.org> AuthorDate: Tue Jan 8 11:26:26 2019 +0100 Commit: Thomas Faber <thomas.faber(a)reactos.org> CommitDate: Tue Jan 8 11:27:33 2019 +0100 [WIN32K:NTUSER] Avoid dereferencing a null pointer in NC_DoNCPaint. CORE-15569 --- win32ss/user/ntuser/nonclient.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/win32ss/user/ntuser/nonclient.c b/win32ss/user/ntuser/nonclient.c index 44476f8cee..8f45582142 100644 --- a/win32ss/user/ntuser/nonclient.c +++ b/win32ss/user/ntuser/nonclient.c @@ -1148,11 +1148,13 @@ NC_DoNCPaint(PWND pWnd, HDC hDC, INT Flags) FillRect(hDC, &TempRect, IntGetSysColorBrush(COLOR_BTNFACE)); if (Parent) + { IntGetClientRect(Parent, &ParentClientRect); - if (HASSIZEGRIP(Style, ExStyle, Parent->style, WindowRect, ParentClientRect)) - { - DrawFrameControl(hDC, &TempRect, DFC_SCROLL, DFCS_SCROLLSIZEGRIP); + if (HASSIZEGRIP(Style, ExStyle, Parent->style, WindowRect, ParentClientRect)) + { + DrawFrameControl(hDC, &TempRect, DFC_SCROLL, DFCS_SCROLLSIZEGRIP); + } } IntDrawScrollBar(pWnd, hDC, SB_VERT);
5 years, 10 months
1
0
0
0
[reactos] 02/02: [NTOSKRNL] Add support for large allocations in !poolfind
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a3f8813fff8c89737aada…
commit a3f8813fff8c89737aadadd22dacfd8338e9eeb0 Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Tue Jan 8 08:42:51 2019 +0100 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Tue Jan 8 08:43:23 2019 +0100 [NTOSKRNL] Add support for large allocations in !poolfind --- ntoskrnl/mm/ARM3/kdbg.c | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/ntoskrnl/mm/ARM3/kdbg.c b/ntoskrnl/mm/ARM3/kdbg.c index ebaf494df6..e3a9ef3adf 100644 --- a/ntoskrnl/mm/ARM3/kdbg.c +++ b/ntoskrnl/mm/ARM3/kdbg.c @@ -26,6 +26,10 @@ typedef struct _IRP_FIND_CTXT } IRP_FIND_CTXT, *PIRP_FIND_CTXT; extern PVOID MmNonPagedPoolEnd0; +extern SIZE_T PoolBigPageTableSize; +extern PPOOL_TRACKER_BIG_PAGES PoolBigPageTable; + +#define POOL_BIG_TABLE_ENTRY_FREE 0x1 /* Pool block/header/list access macros */ #define POOL_ENTRY(x) (PPOOL_HEADER)((ULONG_PTR)(x) - sizeof(POOL_HEADER)) @@ -210,6 +214,34 @@ ExpKdbgExtPoolUsed( return TRUE; } +static +VOID +ExpKdbgExtPoolFindLargePool( + ULONG Tag, + ULONG Mask) +{ + ULONG i; + + KdbpPrint("Scanning large pool allocation table for Tag: %.4s (%p : %p)\n", (PCHAR)&Tag, &PoolBigPageTable[0], &PoolBigPageTable[PoolBigPageTableSize - 1]); + + for (i = 0; i < PoolBigPageTableSize; i++) + { + /* Free entry? */ + if ((ULONG_PTR)PoolBigPageTable[i].Va & POOL_BIG_TABLE_ENTRY_FREE) + { + continue; + } + + if ((PoolBigPageTable[i].Key & Mask) == (Tag & Mask)) + { + /* Print the line */ + KdbpPrint("%p: tag %.4s, size: %I64x\n", + PoolBigPageTable[i].Va, (PCHAR)&PoolBigPageTable[i].Key, + PoolBigPageTable[i].NumberOfPages << PAGE_SHIFT); + } + } +} + static BOOLEAN ExpKdbgExtValidatePoolHeader( @@ -423,7 +455,8 @@ ExpKdbgExtPoolFind( } } - /* FIXME: What about large pool? */ + /* First search for large allocations */ + ExpKdbgExtPoolFindLargePool(Tag, Mask); if (PoolType == NonPagedPool) {
5 years, 10 months
1
0
0
0
[reactos] 01/02: [NTOSKRNL] In !irpfind, add info about current stack major/minor
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e1342127f0c987a1b9247…
commit e1342127f0c987a1b9247472b64479834caa0aa4 Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Mon Jan 7 08:41:36 2019 +0100 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Tue Jan 8 08:43:23 2019 +0100 [NTOSKRNL] In !irpfind, add info about current stack major/minor --- ntoskrnl/mm/ARM3/kdbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ntoskrnl/mm/ARM3/kdbg.c b/ntoskrnl/mm/ARM3/kdbg.c index c0fdf6dc9e..ebaf494df6 100644 --- a/ntoskrnl/mm/ARM3/kdbg.c +++ b/ntoskrnl/mm/ARM3/kdbg.c @@ -490,7 +490,7 @@ ExpKdbgExtIrpFindPrint( { if (!IsComplete) { - KdbpPrint("%p Thread %p current stack belongs to %wZ\n", Irp, Irp->Tail.Overlay.Thread, DriverName); + KdbpPrint("%p Thread %p current stack (%x, %x) belongs to %wZ\n", Irp, Irp->Tail.Overlay.Thread, IoStack->MajorFunction, IoStack->MinorFunction, DriverName); } else {
5 years, 10 months
1
0
0
0
[reactos] 01/01: [KERNEL32] GetComputerNameExW: Fix crash in kernel32_winetest environ test
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=38160b207d263849c8344…
commit 38160b207d263849c83440bee473690ffb222180 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Mon Jan 7 22:45:33 2019 +0100 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Mon Jan 7 22:45:33 2019 +0100 [KERNEL32] GetComputerNameExW: Fix crash in kernel32_winetest environ test --- dll/win32/kernel32/client/compname.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dll/win32/kernel32/client/compname.c b/dll/win32/kernel32/client/compname.c index 96aa505aed..cfe9df5137 100644 --- a/dll/win32/kernel32/client/compname.c +++ b/dll/win32/kernel32/client/compname.c @@ -236,7 +236,8 @@ GetComputerNameExW(COMPUTER_NAME_FORMAT NameType, L"ComputerName", lpBuffer, nSize); - if (ret == FALSE) + if ((ret == FALSE) && + (GetLastError() != ERROR_MORE_DATA)) { ret = GetComputerNameFromRegistry(L"\\Registry\\Machine\\System\\CurrentControlSet" L"\\Control\\ComputerName\\ComputerName",
5 years, 10 months
1
0
0
0
[reactos] 01/01: [UXTHEME] Fix a series of problems regarding ThemeCalculateCaptionButtonsPos Only call it when needed. Also make it fail properly if the window theme could not be opened. CORE-15564
by Giannis Adamopoulos
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=88a69b446bd310e563185…
commit 88a69b446bd310e563185dcd4ec73bc29837485a Author: Giannis Adamopoulos <gadamopoulos(a)reactos.org> AuthorDate: Mon Jan 7 11:38:42 2019 +0200 Commit: Giannis Adamopoulos <gadamopoulos(a)reactos.org> CommitDate: Mon Jan 7 11:38:42 2019 +0200 [UXTHEME] Fix a series of problems regarding ThemeCalculateCaptionButtonsPos Only call it when needed. Also make it fail properly if the window theme could not be opened. CORE-15564 --- dll/win32/uxtheme/nonclient.c | 6 +++++- dll/win32/uxtheme/themehooks.c | 9 +++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/dll/win32/uxtheme/nonclient.c b/dll/win32/uxtheme/nonclient.c index 4171e09264..1ff26a3218 100644 --- a/dll/win32/uxtheme/nonclient.c +++ b/dll/win32/uxtheme/nonclient.c @@ -230,7 +230,11 @@ void ThemeCalculateCaptionButtonsPos(HWND hWnd, HTHEME htheme) return; if (!htheme) - htheme = pwndData->hthemeWindow; + { + htheme = GetNCCaptionTheme(hWnd, style); + if (!htheme) + return; + } if(!GetWindowInfo(hWnd, &wi)) return; diff --git a/dll/win32/uxtheme/themehooks.c b/dll/win32/uxtheme/themehooks.c index 99811808f7..583fce34d4 100644 --- a/dll/win32/uxtheme/themehooks.c +++ b/dll/win32/uxtheme/themehooks.c @@ -323,7 +323,8 @@ ThemePreWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, ULONG_PTR case WM_SIZE: case WM_WINDOWPOSCHANGED: { - ThemeCalculateCaptionButtonsPos(hWnd, NULL); + if(IsAppThemed() && (GetThemeAppProperties() & STAP_ALLOW_NONCLIENT)) + ThemeCalculateCaptionButtonsPos(hWnd, NULL); break; } case WM_THEMECHANGED: @@ -360,7 +361,11 @@ ThemePreWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, ULONG_PTR pwndData->hthemeScrollbar = NULL; } - ThemeCalculateCaptionButtonsPos(hWnd, NULL); + if(IsAppThemed() && (GetThemeAppProperties() & STAP_ALLOW_NONCLIENT)) + ThemeCalculateCaptionButtonsPos(hWnd, NULL); + + pwndData->DirtyThemeRegion = TRUE; + break; } case WM_NCCREATE: {
5 years, 10 months
1
0
0
0
[reactos] 01/01: [NTOSKRNL] Misc fixes to !irpfind
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e6a1851684dadc9107b1b…
commit e6a1851684dadc9107b1b1ec7530f42674d4a5b2 Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Sun Jan 6 23:21:20 2019 +0100 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Sun Jan 6 23:21:20 2019 +0100 [NTOSKRNL] Misc fixes to !irpfind --- ntoskrnl/mm/ARM3/kdbg.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/ntoskrnl/mm/ARM3/kdbg.c b/ntoskrnl/mm/ARM3/kdbg.c index 6079e50529..c0fdf6dc9e 100644 --- a/ntoskrnl/mm/ARM3/kdbg.c +++ b/ntoskrnl/mm/ARM3/kdbg.c @@ -444,9 +444,10 @@ ExpKdbgExtIrpFindPrint( PVOID Context) { PIRP Irp; + BOOLEAN IsComplete = FALSE; PIRP_FIND_CTXT FindCtxt = Context; PIO_STACK_LOCATION IoStack = NULL; - PUNICODE_STRING DriverName; + PUNICODE_STRING DriverName = NULL; ULONG_PTR SData = FindCtxt->SData; ULONG Criteria = FindCtxt->Criteria; @@ -473,8 +474,10 @@ ExpKdbgExtIrpFindPrint( /* Get associated driver */ if (IoStack->DeviceObject && IoStack->DeviceObject->DriverObject) DriverName = &IoStack->DeviceObject->DriverObject->DriverName; - else - DriverName = NULL; + } + else + { + IsComplete = TRUE; } /* Display if: no data, no criteria or if criteria matches data */ @@ -485,7 +488,14 @@ ExpKdbgExtIrpFindPrint( (Criteria & 0x8 && SData == (ULONG_PTR)Irp->Tail.Overlay.Thread) || (Criteria & 0x10 && SData == (ULONG_PTR)Irp->UserEvent)) { - KdbpPrint("%p Thread %p current stack belongs to %wZ\n", Irp, Irp->Tail.Overlay.Thread, DriverName); + if (!IsComplete) + { + KdbpPrint("%p Thread %p current stack belongs to %wZ\n", Irp, Irp->Tail.Overlay.Thread, DriverName); + } + else + { + KdbpPrint("%p Thread %p is complete (CurrentLocation %d > StackCount %d)\n", Irp, Irp->Tail.Overlay.Thread, Irp->CurrentLocation, Irp->StackCount + 1); + } } }
5 years, 10 months
1
0
0
0
[reactos] 01/01: [NTOSKRNL] Move KDBG MM functions implementation to their own file
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=36f90e7e4647d284fc2ea…
commit 36f90e7e4647d284fc2ea8c8f0810f2e71bbcefd Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Sun Jan 6 22:49:23 2019 +0100 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Sun Jan 6 22:50:57 2019 +0100 [NTOSKRNL] Move KDBG MM functions implementation to their own file --- ntoskrnl/mm/ARM3/expool.c | 540 ------------------------------------------- ntoskrnl/mm/ARM3/kdbg.c | 573 ++++++++++++++++++++++++++++++++++++++++++++++ ntoskrnl/ntos.cmake | 1 + 3 files changed, 574 insertions(+), 540 deletions(-) diff --git a/ntoskrnl/mm/ARM3/expool.c b/ntoskrnl/mm/ARM3/expool.c index e69be03cbf..6a791e583f 100644 --- a/ntoskrnl/mm/ARM3/expool.c +++ b/ntoskrnl/mm/ARM3/expool.c @@ -2934,544 +2934,4 @@ ExAllocatePoolWithQuotaTag(IN POOL_TYPE PoolType, return Buffer; } -#if DBG && defined(KDBG) - -BOOLEAN -ExpKdbgExtPool( - ULONG Argc, - PCHAR Argv[]) -{ - ULONG_PTR Address = 0, Flags = 0; - PVOID PoolPage; - PPOOL_HEADER Entry; - BOOLEAN ThisOne; - PULONG Data; - - if (Argc > 1) - { - /* Get address */ - if (!KdbpGetHexNumber(Argv[1], &Address)) - { - KdbpPrint("Invalid parameter: %s\n", Argv[0]); - return TRUE; - } - } - - if (Argc > 2) - { - /* Get address */ - if (!KdbpGetHexNumber(Argv[1], &Flags)) - { - KdbpPrint("Invalid parameter: %s\n", Argv[0]); - return TRUE; - } - } - - /* Check if we got an address */ - if (Address != 0) - { - /* Get the base page */ - PoolPage = PAGE_ALIGN(Address); - } - else - { - KdbpPrint("Heap is unimplemented\n"); - return TRUE; - } - - /* No paging support! */ - if (!MmIsAddressValid(PoolPage)) - { - KdbpPrint("Address not accessible!\n"); - return TRUE; - } - - /* Get pool type */ - if ((Address >= (ULONG_PTR)MmPagedPoolStart) && (Address <= (ULONG_PTR)MmPagedPoolEnd)) - KdbpPrint("Allocation is from PagedPool region\n"); - else if ((Address >= (ULONG_PTR)MmNonPagedPoolStart) && (Address <= (ULONG_PTR)MmNonPagedPoolEnd)) - KdbpPrint("Allocation is from NonPagedPool region\n"); - else - { - KdbpPrint("Address 0x%p is not within any pool!\n", (PVOID)Address); - return TRUE; - } - - /* Loop all entries of that page */ - Entry = PoolPage; - do - { - /* Check if the address is within that entry */ - ThisOne = ((Address >= (ULONG_PTR)Entry) && - (Address < (ULONG_PTR)(Entry + Entry->BlockSize))); - - if (!(Flags & 1) || ThisOne) - { - /* Print the line */ - KdbpPrint("%c%p size: %4d previous size: %4d %s %.4s\n", - ThisOne ? '*' : ' ', Entry, Entry->BlockSize, Entry->PreviousSize, - (Flags & 0x80000000) ? "" : (Entry->PoolType ? "(Allocated)" : "(Free) "), - (Flags & 0x80000000) ? "" : (PCHAR)&Entry->PoolTag); - } - - if (Flags & 1) - { - Data = (PULONG)(Entry + 1); - KdbpPrint(" %p %08lx %08lx %08lx %08lx\n" - " %p %08lx %08lx %08lx %08lx\n", - &Data[0], Data[0], Data[1], Data[2], Data[3], - &Data[4], Data[4], Data[5], Data[6], Data[7]); - } - - /* Go to next entry */ - Entry = POOL_BLOCK(Entry, Entry->BlockSize); - } - while ((Entry->BlockSize != 0) && ((ULONG_PTR)Entry < (ULONG_PTR)PoolPage + PAGE_SIZE)); - - return TRUE; -} - -static -VOID -ExpKdbgExtPoolUsedGetTag(PCHAR Arg, PULONG Tag, PULONG Mask) -{ - CHAR Tmp[4]; - ULONG Len; - USHORT i; - - /* Get the tag */ - Len = strlen(Arg); - if (Len > 4) - { - Len = 4; - } - - /* Generate the mask to have wildcards support */ - for (i = 0; i < Len; ++i) - { - Tmp[i] = Arg[i]; - if (Tmp[i] != '?') - { - *Mask |= (0xFF << i * 8); - } - } - - /* Get the tag in the ulong form */ - *Tag = *((PULONG)Tmp); -} - -BOOLEAN -ExpKdbgExtPoolUsed( - ULONG Argc, - PCHAR Argv[]) -{ - ULONG Tag = 0; - ULONG Mask = 0; - ULONG Flags = 0; - - if (Argc > 1) - { - /* If we have 2+ args, easy: flags then tag */ - if (Argc > 2) - { - ExpKdbgExtPoolUsedGetTag(Argv[2], &Tag, &Mask); - if (!KdbpGetHexNumber(Argv[1], &Flags)) - { - KdbpPrint("Invalid parameter: %s\n", Argv[0]); - } - } - else - { - /* Otherwise, try to find out whether that's flags */ - if (strlen(Argv[1]) == 1 || - (strlen(Argv[1]) == 3 && Argv[1][0] == '0' && Argv[1][1] == 'x')) - { - /* Fallback: if reading flags failed, assume it's a tag */ - if (!KdbpGetHexNumber(Argv[1], &Flags)) - { - ExpKdbgExtPoolUsedGetTag(Argv[1], &Tag, &Mask); - } - } - /* Or tag */ - else - { - ExpKdbgExtPoolUsedGetTag(Argv[1], &Tag, &Mask); - } - } - } - - /* Call the dumper */ - MiDumpPoolConsumers(TRUE, Tag, Mask, Flags); - - return TRUE; -} - -static -BOOLEAN -ExpKdbgExtValidatePoolHeader( - PVOID BaseVa, - PPOOL_HEADER Entry, - POOL_TYPE BasePoolTye) -{ - /* Block size cannot be NULL or negative and it must cover the page */ - if (Entry->BlockSize <= 0) - { - return FALSE; - } - if (Entry->BlockSize * 8 + (ULONG_PTR)Entry - (ULONG_PTR)BaseVa > PAGE_SIZE) - { - return FALSE; - } - - /* - * PreviousSize cannot be 0 unless on page begin - * And it cannot be bigger that our current - * position in page - */ - if (Entry->PreviousSize == 0 && BaseVa != Entry) - { - return FALSE; - } - if (Entry->PreviousSize * 8 > (ULONG_PTR)Entry - (ULONG_PTR)BaseVa) - { - return FALSE; - } - - /* Must be paged pool */ - if (((Entry->PoolType - 1) & BASE_POOL_TYPE_MASK) != BasePoolTye) - { - return FALSE; - } - - /* Match tag mask */ - if ((Entry->PoolTag & 0x00808080) != 0) - { - return FALSE; - } - - return TRUE; -} - -static -VOID -ExpKdbgExtPoolFindPagedPool( - ULONG Tag, - ULONG Mask, - VOID (NTAPI* FoundCallback)(PPOOL_HEADER, PVOID), - PVOID CallbackContext) -{ - ULONG i = 0; - PPOOL_HEADER Entry; - PVOID BaseVa; - PMMPDE PointerPde; - - KdbpPrint("Searching Paged pool (%p : %p) for Tag: %.4s\n", MmPagedPoolStart, MmPagedPoolEnd, (PCHAR)&Tag); - - /* - * To speed up paged pool search, we will use the allocation bipmap. - * This is possible because we live directly in the kernel :-) - */ - i = RtlFindSetBits(MmPagedPoolInfo.PagedPoolAllocationMap, 1, 0); - while (i != 0xFFFFFFFF) - { - BaseVa = (PVOID)((ULONG_PTR)MmPagedPoolStart + (i << PAGE_SHIFT)); - Entry = BaseVa; - - /* Validate our address */ - if ((ULONG_PTR)BaseVa > (ULONG_PTR)MmPagedPoolEnd || (ULONG_PTR)BaseVa + PAGE_SIZE > (ULONG_PTR)MmPagedPoolEnd) - { - break; - } - - /* Check whether we are beyond expansion */ - PointerPde = MiAddressToPde(BaseVa); - if (PointerPde >= MmPagedPoolInfo.NextPdeForPagedPoolExpansion) - { - break; - } - - /* Check if allocation is valid */ - if (MmIsAddressValid(BaseVa)) - { - for (Entry = BaseVa; - (ULONG_PTR)Entry + sizeof(POOL_HEADER) < (ULONG_PTR)BaseVa + PAGE_SIZE; - Entry = (PVOID)((ULONG_PTR)Entry + 8)) - { - /* Try to find whether we have a pool entry */ - if (!ExpKdbgExtValidatePoolHeader(BaseVa, Entry, PagedPool)) - { - continue; - } - - if ((Entry->PoolTag & Mask) == (Tag & Mask)) - { - if (FoundCallback != NULL) - { - FoundCallback(Entry, CallbackContext); - } - else - { - /* Print the line */ - KdbpPrint("%p size: %4d previous size: %4d %s %.4s\n", - Entry, Entry->BlockSize, Entry->PreviousSize, - Entry->PoolType ? "(Allocated)" : "(Free) ", - (PCHAR)&Entry->PoolTag); - } - } - } - } - - i = RtlFindSetBits(MmPagedPoolInfo.PagedPoolAllocationMap, 1, i + 1); - } -} - -extern PVOID MmNonPagedPoolEnd0; -static -VOID -ExpKdbgExtPoolFindNonPagedPool( - ULONG Tag, - ULONG Mask, - VOID (NTAPI* FoundCallback)(PPOOL_HEADER, PVOID), - PVOID CallbackContext) -{ - PPOOL_HEADER Entry; - PVOID BaseVa; - - KdbpPrint("Searching NonPaged pool (%p : %p) for Tag: %.4s\n", MmNonPagedPoolStart, MmNonPagedPoolEnd0, (PCHAR)&Tag); - - /* Brute force search: start browsing the whole non paged pool */ - for (BaseVa = MmNonPagedPoolStart; - (ULONG_PTR)BaseVa + PAGE_SIZE <= (ULONG_PTR)MmNonPagedPoolEnd0; - BaseVa = (PVOID)((ULONG_PTR)BaseVa + PAGE_SIZE)) - { - Entry = BaseVa; - - /* Check whether we are beyond expansion */ - if (BaseVa >= MmNonPagedPoolExpansionStart) - { - break; - } - - /* Check if allocation is valid */ - if (!MmIsAddressValid(BaseVa)) - { - continue; - } - - for (Entry = BaseVa; - (ULONG_PTR)Entry + sizeof(POOL_HEADER) < (ULONG_PTR)BaseVa + PAGE_SIZE; - Entry = (PVOID)((ULONG_PTR)Entry + 8)) - { - /* Try to find whether we have a pool entry */ - if (!ExpKdbgExtValidatePoolHeader(BaseVa, Entry, NonPagedPool)) - { - continue; - } - - if ((Entry->PoolTag & Mask) == (Tag & Mask)) - { - if (FoundCallback != NULL) - { - FoundCallback(Entry, CallbackContext); - } - else - { - /* Print the line */ - KdbpPrint("%p size: %4d previous size: %4d %s %.4s\n", - Entry, Entry->BlockSize, Entry->PreviousSize, - Entry->PoolType ? "(Allocated)" : "(Free) ", - (PCHAR)&Entry->PoolTag); - } - } - } - } -} - -BOOLEAN -ExpKdbgExtPoolFind( - ULONG Argc, - PCHAR Argv[]) -{ - ULONG Tag = 0; - ULONG Mask = 0; - ULONG PoolType = NonPagedPool; - - if (Argc == 1) - { - KdbpPrint("Specify a tag string\n"); - return TRUE; - } - - /* First arg is tag */ - if (strlen(Argv[1]) != 1 || Argv[1][0] != '*') - { - ExpKdbgExtPoolUsedGetTag(Argv[1], &Tag, &Mask); - } - - /* Second arg might be pool to search */ - if (Argc > 2) - { - PoolType = strtoul(Argv[2], NULL, 0); - - if (PoolType > 1) - { - KdbpPrint("Only (non) paged pool are supported\n"); - return TRUE; - } - } - - /* FIXME: What about large pool? */ - - if (PoolType == NonPagedPool) - { - ExpKdbgExtPoolFindNonPagedPool(Tag, Mask, NULL, NULL); - } - else if (PoolType == PagedPool) - { - ExpKdbgExtPoolFindPagedPool(Tag, Mask, NULL, NULL); - } - - return TRUE; -} - -typedef struct _IRP_FIND_CTXT -{ - ULONG_PTR RestartAddress; - ULONG_PTR SData; - ULONG Criteria; -} IRP_FIND_CTXT, *PIRP_FIND_CTXT; - -VOID -NTAPI -ExpKdbgExtIrpFindPrint( - PPOOL_HEADER Entry, - PVOID Context) -{ - PIRP Irp; - PIRP_FIND_CTXT FindCtxt = Context; - PIO_STACK_LOCATION IoStack = NULL; - PUNICODE_STRING DriverName; - ULONG_PTR SData = FindCtxt->SData; - ULONG Criteria = FindCtxt->Criteria; - - /* Free entry, ignore */ - if (Entry->PoolType == 0) - { - return; - } - - /* Get the IRP */ - Irp = (PIRP)POOL_FREE_BLOCK(Entry); - - /* Bail out if not matching restart address */ - if ((ULONG_PTR)Irp < FindCtxt->RestartAddress) - { - return; - } - - /* Avoid bogus IRP stack locations */ - if (Irp->CurrentLocation <= Irp->StackCount + 1) - { - IoStack = IoGetCurrentIrpStackLocation(Irp); - - /* Get associated driver */ - if (IoStack->DeviceObject && IoStack->DeviceObject->DriverObject) - DriverName = &IoStack->DeviceObject->DriverObject->DriverName; - else - DriverName = NULL; - } - - /* Display if: no data, no criteria or if criteria matches data */ - if (SData == 0 || Criteria == 0 || - (Criteria & 0x1 && IoStack && SData == (ULONG_PTR)IoStack->DeviceObject) || - (Criteria & 0x2 && SData == (ULONG_PTR)Irp->Tail.Overlay.OriginalFileObject) || - (Criteria & 0x4 && Irp->MdlAddress && SData == (ULONG_PTR)Irp->MdlAddress->Process) || - (Criteria & 0x8 && SData == (ULONG_PTR)Irp->Tail.Overlay.Thread) || - (Criteria & 0x10 && SData == (ULONG_PTR)Irp->UserEvent)) - { - KdbpPrint("%p Thread %p current stack belongs to %wZ\n", Irp, Irp->Tail.Overlay.Thread, DriverName); - } -} - -BOOLEAN -ExpKdbgExtIrpFind( - ULONG Argc, - PCHAR Argv[]) -{ - ULONG PoolType = NonPagedPool; - IRP_FIND_CTXT FindCtxt; - - /* Pool type */ - if (Argc > 1) - { - PoolType = strtoul(Argv[1], NULL, 0); - - if (PoolType > 1) - { - KdbpPrint("Only (non) paged pool are supported\n"); - return TRUE; - } - } - - RtlZeroMemory(&FindCtxt, sizeof(IRP_FIND_CTXT)); - - /* Restart address */ - if (Argc > 2) - { - if (!KdbpGetHexNumber(Argv[2], &FindCtxt.RestartAddress)) - { - KdbpPrint("Invalid parameter: %s\n", Argv[0]); - FindCtxt.RestartAddress = 0; - } - } - - if (Argc > 4) - { - if (!KdbpGetHexNumber(Argv[4], &FindCtxt.SData)) - { - FindCtxt.SData = 0; - } - else - { - if (strcmp(Argv[3], "device") == 0) - { - FindCtxt.Criteria = 0x1; - } - else if (strcmp(Argv[3], "fileobject") == 0) - { - FindCtxt.Criteria = 0x2; - } - else if (strcmp(Argv[3], "mdlprocess") == 0) - { - FindCtxt.Criteria = 0x4; - } - else if (strcmp(Argv[3], "thread") == 0) - { - FindCtxt.Criteria = 0x8; - } - else if (strcmp(Argv[3], "userevent") == 0) - { - FindCtxt.Criteria = 0x10; - } - else if (strcmp(Argv[3], "arg") == 0) - { - FindCtxt.Criteria = 0x1f; - } - } - } - - if (PoolType == NonPagedPool) - { - ExpKdbgExtPoolFindNonPagedPool(TAG_IRP, 0xFFFFFFFF, ExpKdbgExtIrpFindPrint, &FindCtxt); - } - else if (PoolType == PagedPool) - { - ExpKdbgExtPoolFindPagedPool(TAG_IRP, 0xFFFFFFFF, ExpKdbgExtIrpFindPrint, &FindCtxt); - } - - return TRUE; -} - -#endif // DBG && KDBG - /* EOF */ diff --git a/ntoskrnl/mm/ARM3/kdbg.c b/ntoskrnl/mm/ARM3/kdbg.c new file mode 100644 index 0000000000..6079e50529 --- /dev/null +++ b/ntoskrnl/mm/ARM3/kdbg.c @@ -0,0 +1,573 @@ +/* + * PROJECT: ReactOS Kernel + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: ntoskrnl/mm/ARM3/kdbg.c + * PURPOSE: ARM Memory Manager Kernel Debugger routines + * PROGRAMMERS: ReactOS Portable Systems Group + * Pierre Schweitzer + */ + +/* INCLUDES *******************************************************************/ + +#include <ntoskrnl.h> +#define NDEBUG +#include <debug.h> + +#define MODULE_INVOLVED_IN_ARM3 +#include <mm/ARM3/miarm.h> + +/* GLOBALS ********************************************************************/ + +typedef struct _IRP_FIND_CTXT +{ + ULONG_PTR RestartAddress; + ULONG_PTR SData; + ULONG Criteria; +} IRP_FIND_CTXT, *PIRP_FIND_CTXT; + +extern PVOID MmNonPagedPoolEnd0; + +/* Pool block/header/list access macros */ +#define POOL_ENTRY(x) (PPOOL_HEADER)((ULONG_PTR)(x) - sizeof(POOL_HEADER)) +#define POOL_FREE_BLOCK(x) (PLIST_ENTRY)((ULONG_PTR)(x) + sizeof(POOL_HEADER)) +#define POOL_BLOCK(x, i) (PPOOL_HEADER)((ULONG_PTR)(x) + ((i) * POOL_BLOCK_SIZE)) +#define POOL_NEXT_BLOCK(x) POOL_BLOCK((x), (x)->BlockSize) +#define POOL_PREV_BLOCK(x) POOL_BLOCK((x), -((x)->PreviousSize)) + +VOID MiDumpPoolConsumers(BOOLEAN CalledFromDbg, ULONG Tag, ULONG Mask, ULONG Flags); + +/* PRIVATE FUNCTIONS **********************************************************/ + +#if DBG && defined(KDBG) + +BOOLEAN +ExpKdbgExtPool( + ULONG Argc, + PCHAR Argv[]) +{ + ULONG_PTR Address = 0, Flags = 0; + PVOID PoolPage; + PPOOL_HEADER Entry; + BOOLEAN ThisOne; + PULONG Data; + + if (Argc > 1) + { + /* Get address */ + if (!KdbpGetHexNumber(Argv[1], &Address)) + { + KdbpPrint("Invalid parameter: %s\n", Argv[0]); + return TRUE; + } + } + + if (Argc > 2) + { + /* Get address */ + if (!KdbpGetHexNumber(Argv[1], &Flags)) + { + KdbpPrint("Invalid parameter: %s\n", Argv[0]); + return TRUE; + } + } + + /* Check if we got an address */ + if (Address != 0) + { + /* Get the base page */ + PoolPage = PAGE_ALIGN(Address); + } + else + { + KdbpPrint("Heap is unimplemented\n"); + return TRUE; + } + + /* No paging support! */ + if (!MmIsAddressValid(PoolPage)) + { + KdbpPrint("Address not accessible!\n"); + return TRUE; + } + + /* Get pool type */ + if ((Address >= (ULONG_PTR)MmPagedPoolStart) && (Address <= (ULONG_PTR)MmPagedPoolEnd)) + KdbpPrint("Allocation is from PagedPool region\n"); + else if ((Address >= (ULONG_PTR)MmNonPagedPoolStart) && (Address <= (ULONG_PTR)MmNonPagedPoolEnd)) + KdbpPrint("Allocation is from NonPagedPool region\n"); + else + { + KdbpPrint("Address 0x%p is not within any pool!\n", (PVOID)Address); + return TRUE; + } + + /* Loop all entries of that page */ + Entry = PoolPage; + do + { + /* Check if the address is within that entry */ + ThisOne = ((Address >= (ULONG_PTR)Entry) && + (Address < (ULONG_PTR)(Entry + Entry->BlockSize))); + + if (!(Flags & 1) || ThisOne) + { + /* Print the line */ + KdbpPrint("%c%p size: %4d previous size: %4d %s %.4s\n", + ThisOne ? '*' : ' ', Entry, Entry->BlockSize, Entry->PreviousSize, + (Flags & 0x80000000) ? "" : (Entry->PoolType ? "(Allocated)" : "(Free) "), + (Flags & 0x80000000) ? "" : (PCHAR)&Entry->PoolTag); + } + + if (Flags & 1) + { + Data = (PULONG)(Entry + 1); + KdbpPrint(" %p %08lx %08lx %08lx %08lx\n" + " %p %08lx %08lx %08lx %08lx\n", + &Data[0], Data[0], Data[1], Data[2], Data[3], + &Data[4], Data[4], Data[5], Data[6], Data[7]); + } + + /* Go to next entry */ + Entry = POOL_BLOCK(Entry, Entry->BlockSize); + } + while ((Entry->BlockSize != 0) && ((ULONG_PTR)Entry < (ULONG_PTR)PoolPage + PAGE_SIZE)); + + return TRUE; +} + +static +VOID +ExpKdbgExtPoolUsedGetTag(PCHAR Arg, PULONG Tag, PULONG Mask) +{ + CHAR Tmp[4]; + ULONG Len; + USHORT i; + + /* Get the tag */ + Len = strlen(Arg); + if (Len > 4) + { + Len = 4; + } + + /* Generate the mask to have wildcards support */ + for (i = 0; i < Len; ++i) + { + Tmp[i] = Arg[i]; + if (Tmp[i] != '?') + { + *Mask |= (0xFF << i * 8); + } + } + + /* Get the tag in the ulong form */ + *Tag = *((PULONG)Tmp); +} + +BOOLEAN +ExpKdbgExtPoolUsed( + ULONG Argc, + PCHAR Argv[]) +{ + ULONG Tag = 0; + ULONG Mask = 0; + ULONG Flags = 0; + + if (Argc > 1) + { + /* If we have 2+ args, easy: flags then tag */ + if (Argc > 2) + { + ExpKdbgExtPoolUsedGetTag(Argv[2], &Tag, &Mask); + if (!KdbpGetHexNumber(Argv[1], &Flags)) + { + KdbpPrint("Invalid parameter: %s\n", Argv[0]); + } + } + else + { + /* Otherwise, try to find out whether that's flags */ + if (strlen(Argv[1]) == 1 || + (strlen(Argv[1]) == 3 && Argv[1][0] == '0' && Argv[1][1] == 'x')) + { + /* Fallback: if reading flags failed, assume it's a tag */ + if (!KdbpGetHexNumber(Argv[1], &Flags)) + { + ExpKdbgExtPoolUsedGetTag(Argv[1], &Tag, &Mask); + } + } + /* Or tag */ + else + { + ExpKdbgExtPoolUsedGetTag(Argv[1], &Tag, &Mask); + } + } + } + + /* Call the dumper */ + MiDumpPoolConsumers(TRUE, Tag, Mask, Flags); + + return TRUE; +} + +static +BOOLEAN +ExpKdbgExtValidatePoolHeader( + PVOID BaseVa, + PPOOL_HEADER Entry, + POOL_TYPE BasePoolTye) +{ + /* Block size cannot be NULL or negative and it must cover the page */ + if (Entry->BlockSize <= 0) + { + return FALSE; + } + if (Entry->BlockSize * 8 + (ULONG_PTR)Entry - (ULONG_PTR)BaseVa > PAGE_SIZE) + { + return FALSE; + } + + /* + * PreviousSize cannot be 0 unless on page begin + * And it cannot be bigger that our current + * position in page + */ + if (Entry->PreviousSize == 0 && BaseVa != Entry) + { + return FALSE; + } + if (Entry->PreviousSize * 8 > (ULONG_PTR)Entry - (ULONG_PTR)BaseVa) + { + return FALSE; + } + + /* Must be paged pool */ + if (((Entry->PoolType - 1) & BASE_POOL_TYPE_MASK) != BasePoolTye) + { + return FALSE; + } + + /* Match tag mask */ + if ((Entry->PoolTag & 0x00808080) != 0) + { + return FALSE; + } + + return TRUE; +} + +static +VOID +ExpKdbgExtPoolFindPagedPool( + ULONG Tag, + ULONG Mask, + VOID (NTAPI* FoundCallback)(PPOOL_HEADER, PVOID), + PVOID CallbackContext) +{ + ULONG i = 0; + PPOOL_HEADER Entry; + PVOID BaseVa; + PMMPDE PointerPde; + + KdbpPrint("Searching Paged pool (%p : %p) for Tag: %.4s\n", MmPagedPoolStart, MmPagedPoolEnd, (PCHAR)&Tag); + + /* + * To speed up paged pool search, we will use the allocation bipmap. + * This is possible because we live directly in the kernel :-) + */ + i = RtlFindSetBits(MmPagedPoolInfo.PagedPoolAllocationMap, 1, 0); + while (i != 0xFFFFFFFF) + { + BaseVa = (PVOID)((ULONG_PTR)MmPagedPoolStart + (i << PAGE_SHIFT)); + Entry = BaseVa; + + /* Validate our address */ + if ((ULONG_PTR)BaseVa > (ULONG_PTR)MmPagedPoolEnd || (ULONG_PTR)BaseVa + PAGE_SIZE > (ULONG_PTR)MmPagedPoolEnd) + { + break; + } + + /* Check whether we are beyond expansion */ + PointerPde = MiAddressToPde(BaseVa); + if (PointerPde >= MmPagedPoolInfo.NextPdeForPagedPoolExpansion) + { + break; + } + + /* Check if allocation is valid */ + if (MmIsAddressValid(BaseVa)) + { + for (Entry = BaseVa; + (ULONG_PTR)Entry + sizeof(POOL_HEADER) < (ULONG_PTR)BaseVa + PAGE_SIZE; + Entry = (PVOID)((ULONG_PTR)Entry + 8)) + { + /* Try to find whether we have a pool entry */ + if (!ExpKdbgExtValidatePoolHeader(BaseVa, Entry, PagedPool)) + { + continue; + } + + if ((Entry->PoolTag & Mask) == (Tag & Mask)) + { + if (FoundCallback != NULL) + { + FoundCallback(Entry, CallbackContext); + } + else + { + /* Print the line */ + KdbpPrint("%p size: %4d previous size: %4d %s %.4s\n", + Entry, Entry->BlockSize, Entry->PreviousSize, + Entry->PoolType ? "(Allocated)" : "(Free) ", + (PCHAR)&Entry->PoolTag); + } + } + } + } + + i = RtlFindSetBits(MmPagedPoolInfo.PagedPoolAllocationMap, 1, i + 1); + } +} + +static +VOID +ExpKdbgExtPoolFindNonPagedPool( + ULONG Tag, + ULONG Mask, + VOID (NTAPI* FoundCallback)(PPOOL_HEADER, PVOID), + PVOID CallbackContext) +{ + PPOOL_HEADER Entry; + PVOID BaseVa; + + KdbpPrint("Searching NonPaged pool (%p : %p) for Tag: %.4s\n", MmNonPagedPoolStart, MmNonPagedPoolEnd0, (PCHAR)&Tag); + + /* Brute force search: start browsing the whole non paged pool */ + for (BaseVa = MmNonPagedPoolStart; + (ULONG_PTR)BaseVa + PAGE_SIZE <= (ULONG_PTR)MmNonPagedPoolEnd0; + BaseVa = (PVOID)((ULONG_PTR)BaseVa + PAGE_SIZE)) + { + Entry = BaseVa; + + /* Check whether we are beyond expansion */ + if (BaseVa >= MmNonPagedPoolExpansionStart) + { + break; + } + + /* Check if allocation is valid */ + if (!MmIsAddressValid(BaseVa)) + { + continue; + } + + for (Entry = BaseVa; + (ULONG_PTR)Entry + sizeof(POOL_HEADER) < (ULONG_PTR)BaseVa + PAGE_SIZE; + Entry = (PVOID)((ULONG_PTR)Entry + 8)) + { + /* Try to find whether we have a pool entry */ + if (!ExpKdbgExtValidatePoolHeader(BaseVa, Entry, NonPagedPool)) + { + continue; + } + + if ((Entry->PoolTag & Mask) == (Tag & Mask)) + { + if (FoundCallback != NULL) + { + FoundCallback(Entry, CallbackContext); + } + else + { + /* Print the line */ + KdbpPrint("%p size: %4d previous size: %4d %s %.4s\n", + Entry, Entry->BlockSize, Entry->PreviousSize, + Entry->PoolType ? "(Allocated)" : "(Free) ", + (PCHAR)&Entry->PoolTag); + } + } + } + } +} + +BOOLEAN +ExpKdbgExtPoolFind( + ULONG Argc, + PCHAR Argv[]) +{ + ULONG Tag = 0; + ULONG Mask = 0; + ULONG PoolType = NonPagedPool; + + if (Argc == 1) + { + KdbpPrint("Specify a tag string\n"); + return TRUE; + } + + /* First arg is tag */ + if (strlen(Argv[1]) != 1 || Argv[1][0] != '*') + { + ExpKdbgExtPoolUsedGetTag(Argv[1], &Tag, &Mask); + } + + /* Second arg might be pool to search */ + if (Argc > 2) + { + PoolType = strtoul(Argv[2], NULL, 0); + + if (PoolType > 1) + { + KdbpPrint("Only (non) paged pool are supported\n"); + return TRUE; + } + } + + /* FIXME: What about large pool? */ + + if (PoolType == NonPagedPool) + { + ExpKdbgExtPoolFindNonPagedPool(Tag, Mask, NULL, NULL); + } + else if (PoolType == PagedPool) + { + ExpKdbgExtPoolFindPagedPool(Tag, Mask, NULL, NULL); + } + + return TRUE; +} + +VOID +NTAPI +ExpKdbgExtIrpFindPrint( + PPOOL_HEADER Entry, + PVOID Context) +{ + PIRP Irp; + PIRP_FIND_CTXT FindCtxt = Context; + PIO_STACK_LOCATION IoStack = NULL; + PUNICODE_STRING DriverName; + ULONG_PTR SData = FindCtxt->SData; + ULONG Criteria = FindCtxt->Criteria; + + /* Free entry, ignore */ + if (Entry->PoolType == 0) + { + return; + } + + /* Get the IRP */ + Irp = (PIRP)POOL_FREE_BLOCK(Entry); + + /* Bail out if not matching restart address */ + if ((ULONG_PTR)Irp < FindCtxt->RestartAddress) + { + return; + } + + /* Avoid bogus IRP stack locations */ + if (Irp->CurrentLocation <= Irp->StackCount + 1) + { + IoStack = IoGetCurrentIrpStackLocation(Irp); + + /* Get associated driver */ + if (IoStack->DeviceObject && IoStack->DeviceObject->DriverObject) + DriverName = &IoStack->DeviceObject->DriverObject->DriverName; + else + DriverName = NULL; + } + + /* Display if: no data, no criteria or if criteria matches data */ + if (SData == 0 || Criteria == 0 || + (Criteria & 0x1 && IoStack && SData == (ULONG_PTR)IoStack->DeviceObject) || + (Criteria & 0x2 && SData == (ULONG_PTR)Irp->Tail.Overlay.OriginalFileObject) || + (Criteria & 0x4 && Irp->MdlAddress && SData == (ULONG_PTR)Irp->MdlAddress->Process) || + (Criteria & 0x8 && SData == (ULONG_PTR)Irp->Tail.Overlay.Thread) || + (Criteria & 0x10 && SData == (ULONG_PTR)Irp->UserEvent)) + { + KdbpPrint("%p Thread %p current stack belongs to %wZ\n", Irp, Irp->Tail.Overlay.Thread, DriverName); + } +} + +BOOLEAN +ExpKdbgExtIrpFind( + ULONG Argc, + PCHAR Argv[]) +{ + ULONG PoolType = NonPagedPool; + IRP_FIND_CTXT FindCtxt; + + /* Pool type */ + if (Argc > 1) + { + PoolType = strtoul(Argv[1], NULL, 0); + + if (PoolType > 1) + { + KdbpPrint("Only (non) paged pool are supported\n"); + return TRUE; + } + } + + RtlZeroMemory(&FindCtxt, sizeof(IRP_FIND_CTXT)); + + /* Restart address */ + if (Argc > 2) + { + if (!KdbpGetHexNumber(Argv[2], &FindCtxt.RestartAddress)) + { + KdbpPrint("Invalid parameter: %s\n", Argv[0]); + FindCtxt.RestartAddress = 0; + } + } + + if (Argc > 4) + { + if (!KdbpGetHexNumber(Argv[4], &FindCtxt.SData)) + { + FindCtxt.SData = 0; + } + else + { + if (strcmp(Argv[3], "device") == 0) + { + FindCtxt.Criteria = 0x1; + } + else if (strcmp(Argv[3], "fileobject") == 0) + { + FindCtxt.Criteria = 0x2; + } + else if (strcmp(Argv[3], "mdlprocess") == 0) + { + FindCtxt.Criteria = 0x4; + } + else if (strcmp(Argv[3], "thread") == 0) + { + FindCtxt.Criteria = 0x8; + } + else if (strcmp(Argv[3], "userevent") == 0) + { + FindCtxt.Criteria = 0x10; + } + else if (strcmp(Argv[3], "arg") == 0) + { + FindCtxt.Criteria = 0x1f; + } + } + } + + if (PoolType == NonPagedPool) + { + ExpKdbgExtPoolFindNonPagedPool(TAG_IRP, 0xFFFFFFFF, ExpKdbgExtIrpFindPrint, &FindCtxt); + } + else if (PoolType == PagedPool) + { + ExpKdbgExtPoolFindPagedPool(TAG_IRP, 0xFFFFFFFF, ExpKdbgExtIrpFindPrint, &FindCtxt); + } + + return TRUE; +} + +#endif // DBG && KDBG + +/* EOF */ diff --git a/ntoskrnl/ntos.cmake b/ntoskrnl/ntos.cmake index 147691bd4c..38dc52aa78 100644 --- a/ntoskrnl/ntos.cmake +++ b/ntoskrnl/ntos.cmake @@ -199,6 +199,7 @@ list(APPEND SOURCE ${REACTOS_SOURCE_DIR}/ntoskrnl/mm/ARM3/expool.c ${REACTOS_SOURCE_DIR}/ntoskrnl/mm/ARM3/hypermap.c ${REACTOS_SOURCE_DIR}/ntoskrnl/mm/ARM3/iosup.c + ${REACTOS_SOURCE_DIR}/ntoskrnl/mm/ARM3/kdbg.c ${REACTOS_SOURCE_DIR}/ntoskrnl/mm/ARM3/largepag.c ${REACTOS_SOURCE_DIR}/ntoskrnl/mm/ARM3/mdlsup.c ${REACTOS_SOURCE_DIR}/ntoskrnl/mm/ARM3/mmdbg.c
5 years, 10 months
1
0
0
0
[reactos] 04/04: [GDI32] Add missing dependency
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0bfa6722ba277bee8122f…
commit 0bfa6722ba277bee8122fbc5271af2452ff1d2e9 Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Sun Jan 6 20:57:10 2019 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Jan 6 21:07:28 2019 +0100 [GDI32] Add missing dependency --- win32ss/gdi/gdi32/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/win32ss/gdi/gdi32/CMakeLists.txt b/win32ss/gdi/gdi32/CMakeLists.txt index 527c8f8735..936babbb98 100644 --- a/win32ss/gdi/gdi32/CMakeLists.txt +++ b/win32ss/gdi/gdi32/CMakeLists.txt @@ -66,4 +66,5 @@ target_link_libraries(gdi32 add_importlibs(gdi32 user32 advapi32 kernel32 ntdll) add_pch(gdi32 include/precomp.h SOURCE) +add_dependencies(gdi32 psdk) add_cd_file(TARGET gdi32 DESTINATION reactos/system32 FOR all)
5 years, 10 months
1
0
0
0
← Newer
1
...
20
21
22
23
24
25
26
...
30
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
Results per page:
10
25
50
100
200