ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
September 2013
----- 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
16 participants
554 discussions
Start a n
N
ew thread
[akhaldi] 59936: [RSYM] * Fix long section names and correct some wrong use of ULONG_PTR. Brought to you by Arty.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Sep 1 11:17:36 2013 New Revision: 59936 URL:
http://svn.reactos.org/svn/reactos?rev=59936&view=rev
Log: [RSYM] * Fix long section names and correct some wrong use of ULONG_PTR. Brought to you by Arty. Modified: trunk/reactos/tools/rsym/rsym.c Modified: trunk/reactos/tools/rsym/rsym.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rsym/rsym.c?rev=5993…
============================================================================== --- trunk/reactos/tools/rsym/rsym.c [iso-8859-1] (original) +++ trunk/reactos/tools/rsym/rsym.c [iso-8859-1] Sun Sep 1 11:17:36 2013 @@ -914,12 +914,18 @@ /* Each coff symbol is 18 bytes and the string table follows */ char *StringTable = (char *)InData + InFileHeader->PointerToSymbolTable + 18 * InFileHeader->NumberOfSymbols; + ULONG StringTableLength = 0; + ULONG StringTableLocation; StartOfRawData = 0; for (Section = 0; Section < InFileHeader->NumberOfSections; Section++) { const BYTE *SectionName = GetSectionName(StringTable, InSectionHeaders[Section].Name); + if (InSectionHeaders[Section].Name[0] == '/') + { + StringTableLength = atoi(InSectionHeaders[Section].Name+1) + strlen(SectionName) + 1; + } if ((StartOfRawData == 0 || InSectionHeaders[Section].PointerToRawData < StartOfRawData) && InSectionHeaders[Section].PointerToRawData != 0 && (strncmp((char *) SectionName, ".stab", 5)) != 0 @@ -979,6 +985,9 @@ OutOptHeader->SizeOfImage = 0; RosSymOffset = 0; OutRelocSection = NULL; + + StringTableLocation = StartOfRawData; + for (Section = 0; Section < InFileHeader->NumberOfSections; Section++) { const BYTE *SectionName = GetSectionName(StringTable, @@ -1004,6 +1013,7 @@ { OutRelocSection = CurrentSectionHeader; } + StringTableLocation = CurrentSectionHeader->PointerToRawData + CurrentSectionHeader->SizeOfRawData; (OutFileHeader->NumberOfSections)++; CurrentSectionHeader++; } @@ -1062,11 +1072,22 @@ memset((char *) PaddedRosSym + RosSymLength, '\0', RosSymFileLength - RosSymLength); + + /* Position the string table after our new section */ + StringTableLocation = RosSymOffset + RosSymFileLength; } else { PaddedRosSym = NULL; } + + /* Set the string table area in the header if we need it */ + if (StringTableLength) + { + OutFileHeader->PointerToSymbolTable = StringTableLocation; + OutFileHeader->NumberOfSymbols = 0; + } + CheckSum = 0; for (i = 0; i < StartOfRawData / 2; i++) { @@ -1139,6 +1160,14 @@ } } } + + fseek(OutFile, OutFileHeader->PointerToSymbolTable, 0); + /* COFF string section is preceeded by a length */ + fwrite((char*)&StringTableLength, 1, sizeof(StringTableLength), OutFile); + /* We just copy enough of the string table to contain the strings we want + The string table length technically counts as part of the string table + space itself. */ + fwrite(StringTable+4, 1, StringTableLength, OutFile); if (PaddedRosSym) {
11 years, 3 months
1
0
0
0
[akhaldi] 59935: [DBGHELP] * Speedup dbghelp mainly for the x64 builds. Brought to you by Arty. Should be sent upstream.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Sep 1 11:11:52 2013 New Revision: 59935 URL:
http://svn.reactos.org/svn/reactos?rev=59935&view=rev
Log: [DBGHELP] * Speedup dbghelp mainly for the x64 builds. Brought to you by Arty. Should be sent upstream. Modified: trunk/reactos/dll/win32/dbghelp/dbghelp_private.h trunk/reactos/dll/win32/dbghelp/dbghelp_ros.diff trunk/reactos/dll/win32/dbghelp/module.c trunk/reactos/dll/win32/dbghelp/symbol.c Modified: trunk/reactos/dll/win32/dbghelp/dbghelp_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/dbghelp_…
============================================================================== --- trunk/reactos/dll/win32/dbghelp/dbghelp_private.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/dbghelp/dbghelp_private.h [iso-8859-1] Sun Sep 1 11:11:52 2013 @@ -363,6 +363,13 @@ } u; }; +struct symt_idx_to_ptr +{ + struct hash_table_elt hash_elt; + DWORD idx; + const struct symt *sym; +}; + extern const struct wine_rb_functions source_rb_functions DECLSPEC_HIDDEN; struct module { @@ -387,6 +394,9 @@ unsigned sorttab_size; struct symt_ht** addr_sorttab; struct hash_table ht_symbols; +#ifdef __x86_64__ + struct hash_table ht_symaddr; +#endif /* types */ struct hash_table ht_types; Modified: trunk/reactos/dll/win32/dbghelp/dbghelp_ros.diff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/dbghelp_…
============================================================================== --- trunk/reactos/dll/win32/dbghelp/dbghelp_ros.diff [iso-8859-1] (original) +++ trunk/reactos/dll/win32/dbghelp/dbghelp_ros.diff [iso-8859-1] Sun Sep 1 11:11:52 2013 @@ -1,6 +1,6 @@ -diff -prudN e:\Wine\dlls\dbghelp/cpu_i386.c e:\reactos-dwarf\dll\win32\dbghelp/cpu_i386.c +diff -prudN e:\Wine\dlls\dbghelp/cpu_i386.c e:\reactos\dll\win32\dbghelp/cpu_i386.c --- e:\Wine\dlls\dbghelp/cpu_i386.c 2012-12-09 09:57:02.223180200 +0100 -+++ e:\reactos-dwarf\dll\win32\dbghelp/cpu_i386.c 2013-07-14 16:01:45.804981700 +0100 ++++ e:\reactos\dll\win32\dbghelp/cpu_i386.c 2013-07-31 14:07:19.201466300 +0100 @@ -20,12 +20,17 @@ #include <assert.h> @@ -114,9 +114,9 @@ + NULL, +#endif }; -diff -prudN e:\Wine\dlls\dbghelp/cpu_x86_64.c e:\reactos-dwarf\dll\win32\dbghelp/cpu_x86_64.c +diff -prudN e:\Wine\dlls\dbghelp/cpu_x86_64.c e:\reactos\dll\win32\dbghelp/cpu_x86_64.c --- e:\Wine\dlls\dbghelp/cpu_x86_64.c 2012-04-02 20:39:57.749333300 +0100 -+++ e:\reactos-dwarf\dll\win32\dbghelp/cpu_x86_64.c 2013-07-14 16:01:02.487336800 +0100 ++++ e:\reactos\dll\win32\dbghelp/cpu_x86_64.c 2013-06-16 10:06:39.482074000 +0100 @@ -302,10 +302,10 @@ static BOOL is_inside_epilog(struct cpu_ if ((op0 & 0xf8) == 0x48) { @@ -145,9 +145,9 @@ if (op0 & 0x06) return FALSE; /* rex.RX must be cleared */ if (((op2 >> 3) & 7) != 4) return FALSE; /* dest reg mus be %rsp */ if ((op2 & 7) == 4) return FALSE; /* no SIB byte allowed */ -diff -prudN e:\Wine\dlls\dbghelp/dbghelp.c e:\reactos-dwarf\dll\win32\dbghelp/dbghelp.c +diff -prudN e:\Wine\dlls\dbghelp/dbghelp.c e:\reactos\dll\win32\dbghelp/dbghelp.c --- e:\Wine\dlls\dbghelp/dbghelp.c 2013-03-16 11:54:52.395468000 +0100 -+++ e:\reactos-dwarf\dll\win32\dbghelp/dbghelp.c 2013-07-17 21:37:35.292366600 +0100 ++++ e:\reactos\dll\win32\dbghelp/dbghelp.c 2013-07-31 14:07:19.207470800 +0100 @@ -21,11 +21,14 @@ #include "config.h" @@ -222,9 +222,9 @@ return TRUE; } -diff -prudN e:\Wine\dlls\dbghelp/dbghelp_private.h e:\reactos-dwarf\dll\win32\dbghelp/dbghelp_private.h +diff -prudN e:\Wine\dlls\dbghelp/dbghelp_private.h e:\reactos\dll\win32\dbghelp/dbghelp_private.h --- e:\Wine\dlls\dbghelp/dbghelp_private.h 2012-04-02 20:39:57.749333300 +0100 -+++ e:\reactos-dwarf\dll\win32\dbghelp/dbghelp_private.h 2013-07-14 16:01:46.453826200 +0100 ++++ e:\reactos\dll\win32\dbghelp/dbghelp_private.h 2013-09-01 11:29:17.911557200 +0100 @@ -21,19 +21,30 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ @@ -267,7 +267,31 @@ /* #define USE_STATS */ -@@ -671,7 +682,9 @@ extern BOOL dwarf2_virtual_unwin +@@ -352,6 +363,13 @@ struct module_format + } u; + }; + ++struct symt_idx_to_ptr ++{ ++ struct hash_table_elt hash_elt; ++ DWORD idx; ++ const struct symt *sym; ++}; ++ + extern const struct wine_rb_functions source_rb_functions DECLSPEC_HIDDEN; + struct module + { +@@ -376,6 +394,9 @@ struct module + unsigned sorttab_size; + struct symt_ht** addr_sorttab; + struct hash_table ht_symbols; ++#ifdef __x86_64__ ++ struct hash_table ht_symaddr; ++#endif + + /* types */ + struct hash_table ht_types; +@@ -671,7 +692,9 @@ extern BOOL dwarf2_virtual_unwin CONTEXT* context, ULONG_PTR* cfa) DECLSPEC_HIDDEN; /* stack.c */ @@ -280,7 +304,7 @@ diff -prudN e:\Wine\dlls\dbghelp/dwarf.c e:\reactos-dwarf\dll\win32\dbghelp/dwarf.c --- e:\Wine\dlls\dbghelp/dwarf.c 2013-03-02 14:17:59.439371000 +0100 -+++ e:\reactos-dwarf\dll\win32\dbghelp/dwarf.c 2013-07-14 16:01:46.490851000 +0100 ++++ e:\reactos\dll\win32\dbghelp/dwarf.c 2013-07-31 14:07:19.222482300 +0100 @@ -22,23 +22,23 @@ #define NONAMELESSUNION @@ -352,9 +376,9 @@ if (!(ret_type = dwarf2_lookup_type(ctx, di))) { ret_type = ctx->symt_cache[sc_void]; -diff -prudN e:\Wine\dlls\dbghelp/dwarf.h e:\reactos-dwarf\dll\win32\dbghelp/dwarf.h +diff -prudN e:\Wine\dlls\dbghelp/dwarf.h e:\reactos\dll\win32\dbghelp/dwarf.h --- e:\Wine\dlls\dbghelp/dwarf.h 2011-09-16 23:22:36.194780200 +0100 -+++ e:\reactos-dwarf\dll\win32\dbghelp/dwarf.h 2013-07-14 16:01:46.862099400 +0100 ++++ e:\reactos\dll\win32\dbghelp/dwarf.h 2013-07-31 14:07:19.227485700 +0100 @@ -554,3 +554,15 @@ enum dwarf_call_frame_info #define DW_INL_inlined 0x01 #define DW_INL_declared_not_inlined 0x02 @@ -372,9 +396,9 @@ +} +#endif -diff -prudN e:\Wine\dlls\dbghelp/image_private.h e:\reactos-dwarf\dll\win32\dbghelp/image_private.h +diff -prudN e:\Wine\dlls\dbghelp/image_private.h e:\reactos\dll\win32\dbghelp/image_private.h --- e:\Wine\dlls\dbghelp/image_private.h 2012-04-02 20:39:57.752333500 +0100 -+++ e:\reactos-dwarf\dll\win32\dbghelp/image_private.h 2013-07-14 16:01:46.946185400 +0100 ++++ e:\reactos\dll\win32\dbghelp/image_private.h 2013-07-31 14:07:19.195462800 +0100 @@ -45,7 +45,7 @@ #define IMAGE_NO_MAP ((void*)-1) @@ -444,9 +468,9 @@ default: assert(0); return 0; } -diff -prudN e:\Wine\dlls\dbghelp/module.c e:\reactos-dwarf\dll\win32\dbghelp/module.c +diff -prudN e:\Wine\dlls\dbghelp/module.c e:\reactos\dll\win32\dbghelp/module.c --- e:\Wine\dlls\dbghelp/module.c 2012-09-09 19:47:53.367024200 +0100 -+++ e:\reactos-dwarf\dll\win32\dbghelp/module.c 2013-07-14 16:01:46.973202500 +0100 ++++ e:\reactos\dll\win32\dbghelp/module.c 2013-09-01 11:29:17.840509700 +0100 @@ -19,16 +19,19 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ @@ -474,7 +498,17 @@ WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); -@@ -346,9 +349,11 @@ BOOL module_get_debug(struct module_pair +@@ -220,6 +223,9 @@ struct module* module_new(struct process + */ + hash_table_init(&module->pool, &module->ht_symbols, 4096); + hash_table_init(&module->pool, &module->ht_types, 4096); ++#ifdef __x86_64__ ++ hash_table_init(&module->pool, &module->ht_symaddr, 4096); ++#endif + vector_init(&module->vtypes, sizeof(struct symt*), 32); + + module->sources_used = 0; +@@ -346,9 +352,11 @@ BOOL module_get_debug(struct module_pair if (pair->effective->is_virtual) ret = FALSE; else switch (pair->effective->type) { @@ -486,7 +520,7 @@ case DMT_PE: idslW64.SizeOfStruct = sizeof(idslW64); idslW64.BaseOfImage = pair->effective->module.BaseOfImage; -@@ -365,9 +370,11 @@ BOOL module_get_debug(struct module_pair +@@ -365,9 +373,11 @@ BOOL module_get_debug(struct module_pair ret ? CBA_DEFERRED_SYMBOL_LOAD_COMPLETE : CBA_DEFERRED_SYMBOL_LOAD_FAILURE, &idslW64); break; @@ -498,7 +532,7 @@ default: ret = FALSE; break; -@@ -506,11 +513,13 @@ enum module_type module_get_type_by_name +@@ -506,11 +516,13 @@ enum module_type module_get_type_by_name /****************************************************************** * refresh_module_list */ @@ -512,7 +546,7 @@ /*********************************************************************** * SymLoadModule (DBGHELP.@) -@@ -594,7 +603,9 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE +@@ -594,7 +606,9 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE if (Flags & ~(SLMFLAG_VIRTUAL)) FIXME("Unsupported Flags %08x for %s\n", Flags, debugstr_w(wImageName)); @@ -522,7 +556,7 @@ /* this is a Wine extension to the API just to redo the synchronisation */ if (!wImageName && !hFile) return 0; -@@ -618,6 +629,7 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE +@@ -618,6 +632,7 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE wImageName) { /* and finally an ELF or Mach-O module */ @@ -530,7 +564,7 @@ switch (module_get_type_by_name(wImageName)) { case DMT_ELF: -@@ -630,6 +642,7 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE +@@ -630,6 +645,7 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE /* Ignored */ break; } @@ -538,7 +572,7 @@ } } if (!module) -@@ -819,6 +832,7 @@ BOOL WINAPI SymEnumerateModulesW64(HAND +@@ -819,6 +835,7 @@ BOOL WINAPI SymEnumerateModulesW64(HAND return TRUE; } @@ -546,7 +580,7 @@ /****************************************************************** * EnumerateLoadedModules64 (DBGHELP.@) * -@@ -919,6 +933,7 @@ BOOL WINAPI EnumerateLoadedModulesW64(H +@@ -919,6 +936,7 @@ BOOL WINAPI EnumerateLoadedModulesW64(H return sz != 0 && i == sz; } @@ -554,7 +588,7 @@ /****************************************************************** * SymGetModuleInfo (DBGHELP.@) -@@ -1131,7 +1146,11 @@ BOOL WINAPI SymRefreshModuleList(HANDLE +@@ -1131,7 +1149,11 @@ BOOL WINAPI SymRefreshModuleList(HANDLE if (!(pcs = process_find_by_handle(hProcess))) return FALSE; @@ -567,9 +601,9 @@ /*********************************************************************** -diff -prudN e:\Wine\dlls\dbghelp/pe_module.c e:\reactos-dwarf\dll\win32\dbghelp/pe_module.c +diff -prudN e:\Wine\dlls\dbghelp/pe_module.c e:\reactos\dll\win32\dbghelp/pe_module.c --- e:\Wine\dlls\dbghelp/pe_module.c 2012-04-02 20:39:57.755333700 +0100 -+++ e:\reactos-dwarf\dll\win32\dbghelp/pe_module.c 2013-07-14 17:06:18.750513200 +0100 ++++ e:\reactos\dll\win32\dbghelp/pe_module.c 2013-07-31 14:07:19.229487000 +0100 @@ -31,8 +31,10 @@ #include "dbghelp_private.h" @@ -608,9 +642,9 @@ /* if we still have no debug info (we could only get SymExport at this * point), then do the SymExport except if we have an ELF container, -diff -prudN e:\Wine\dlls\dbghelp/source.c e:\reactos-dwarf\dll\win32\dbghelp/source.c +diff -prudN e:\Wine\dlls\dbghelp/source.c e:\reactos\dll\win32\dbghelp/source.c --- e:\Wine\dlls\dbghelp/source.c 2011-09-16 23:22:36.198780400 +0100 -+++ e:\reactos-dwarf\dll\win32\dbghelp/source.c 2013-07-14 16:01:47.027608100 +0100 ++++ e:\reactos\dll\win32\dbghelp/source.c 2013-07-31 14:07:19.220481000 +0100 @@ -18,14 +18,17 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * @@ -634,9 +668,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); -diff -prudN e:\Wine\dlls\dbghelp/stabs.c e:\reactos-dwarf\dll\win32\dbghelp/stabs.c +diff -prudN e:\Wine\dlls\dbghelp/stabs.c e:\reactos\dll\win32\dbghelp/stabs.c --- e:\Wine\dlls\dbghelp/stabs.c 2012-08-13 02:55:03.317206300 +0100 -+++ e:\reactos-dwarf\dll\win32\dbghelp/stabs.c 2013-07-14 17:06:14.969603400 +0100 ++++ e:\reactos\dll\win32\dbghelp/stabs.c 2013-07-31 14:07:19.210472800 +0100 @@ -29,41 +29,47 @@ * available (hopefully) from
http://sources.redhat.com/gdb/onlinedocs
*/ @@ -699,9 +733,9 @@ #ifndef N_STAB #define N_STAB 0xe0 -diff -prudN e:\Wine\dlls\dbghelp/storage.c e:\reactos-dwarf\dll\win32\dbghelp/storage.c +diff -prudN e:\Wine\dlls\dbghelp/storage.c e:\reactos\dll\win32\dbghelp/storage.c --- e:\Wine\dlls\dbghelp/storage.c 2011-09-16 23:22:36.199780500 +0100 -+++ e:\reactos-dwarf\dll\win32\dbghelp/storage.c 2013-07-14 16:01:47.077595900 +0100 ++++ e:\reactos\dll\win32\dbghelp/storage.c 2013-07-31 14:07:19.203469700 +0100 @@ -23,7 +23,10 @@ #include "config.h" #include <assert.h> @@ -716,7 +750,7 @@ diff -prudN e:\Wine\dlls\dbghelp/symbol.c e:\reactos-dwarf\dll\win32\dbghelp/symbol.c --- e:\Wine\dlls\dbghelp/symbol.c 2012-04-02 20:39:57.756333700 +0100 -+++ e:\reactos-dwarf\dll\win32\dbghelp/symbol.c 2013-07-17 04:29:08.161225800 +0100 ++++ e:\reactos\dll\win32\dbghelp/symbol.c 2013-09-01 11:31:20.334679400 +0100 @@ -31,9 +31,12 @@ #include <sys/types.h> #include <assert.h> @@ -731,9 +765,65 @@ WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); WINE_DECLARE_DEBUG_CHANNEL(dbghelp_symt); -diff -prudN e:\Wine\dlls\dbghelp/type.c e:\reactos-dwarf\dll\win32\dbghelp/type.c +@@ -67,18 +70,39 @@ int symt_cmp_addr(const void* p1, const + + DWORD symt_ptr2index(struct module* module, const struct symt* sym) + { +-#ifdef _WIN64 ++#ifdef __x86_64__ + const struct symt** c; +- int len = vector_length(&module->vsymt), i; ++ int len = vector_length(&module->vsymt); ++ struct hash_table_iter hti; ++ void *ptr; ++ struct symt_idx_to_ptr *idx_to_ptr; ++ /* place enough storage on the stack to represent a pointer in %p form */ ++ char ptrbuf[3 + (sizeof(void *) * 2)]; + +- /* FIXME: this is inefficient */ +- for (i = 0; i < len; i++) +- { +- if (*(struct symt**)vector_at(&module->vsymt, i) == sym) +- return i + 1; ++ /* make a string representation of the pointer to use as a hash key */ ++ sprintf(ptrbuf, "%p", sym); ++ hash_table_iter_init(&module->ht_symaddr, &hti, ptrbuf); ++ ++ /* try to find the pointer in our ht */ ++ while ((ptr = hash_table_iter_up(&hti))) { ++ idx_to_ptr = GET_ENTRY(ptr, struct symt_idx_to_ptr, hash_elt); ++ if (idx_to_ptr->sym == sym) ++ return idx_to_ptr->idx; + } ++ + /* not found */ ++ /* add the symbol to our symbol vector */ + c = vector_add(&module->vsymt, &module->pool); ++ ++ /* add an idx to ptr mapping so we can find it again by address */ ++ if ((idx_to_ptr = pool_alloc(&module->pool, sizeof(*idx_to_ptr)))) ++ { ++ idx_to_ptr->hash_elt.name = pool_strdup(&module->pool, ptrbuf); ++ idx_to_ptr->sym = sym; ++ idx_to_ptr->idx = len + 1; ++ hash_table_add(&module->ht_symaddr, &idx_to_ptr->hash_elt); ++ } ++ + if (c) *c = sym; + return len + 1; + #else +@@ -88,7 +112,7 @@ DWORD symt_ptr2index(struct + + struct symt* symt_index2ptr(struct module* module, DWORD id) + { +-#ifdef _WIN64 ++#ifdef __x86_64__ + if (!id-- || id >= vector_length(&module->vsymt)) return NULL; + return *(struct symt**)vector_at(&module->vsymt, id); + #else +diff -prudN e:\Wine\dlls\dbghelp/type.c e:\reactos\dll\win32\dbghelp/type.c --- e:\Wine\dlls\dbghelp/type.c 2012-04-02 20:39:57.756333700 +0100 -+++ e:\reactos-dwarf\dll\win32\dbghelp/type.c 2013-07-14 16:01:47.136913600 +0100 ++++ e:\reactos\dll\win32\dbghelp/type.c 2013-07-31 14:07:19.197464100 +0100 @@ -29,10 +29,13 @@ #include <stdarg.h> #include <assert.h> Modified: trunk/reactos/dll/win32/dbghelp/module.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/module.c…
============================================================================== --- trunk/reactos/dll/win32/dbghelp/module.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/dbghelp/module.c [iso-8859-1] Sun Sep 1 11:11:52 2013 @@ -223,6 +223,9 @@ */ hash_table_init(&module->pool, &module->ht_symbols, 4096); hash_table_init(&module->pool, &module->ht_types, 4096); +#ifdef __x86_64__ + hash_table_init(&module->pool, &module->ht_symaddr, 4096); +#endif vector_init(&module->vtypes, sizeof(struct symt*), 32); module->sources_used = 0; Modified: trunk/reactos/dll/win32/dbghelp/symbol.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/symbol.c…
============================================================================== --- trunk/reactos/dll/win32/dbghelp/symbol.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/dbghelp/symbol.c [iso-8859-1] Sun Sep 1 11:11:52 2013 @@ -72,16 +72,37 @@ { #ifdef __x86_64__ const struct symt** c; - int len = vector_length(&module->vsymt), i; - - /* FIXME: this is inefficient */ - for (i = 0; i < len; i++) - { - if (*(struct symt**)vector_at(&module->vsymt, i) == sym) - return i + 1; - } + int len = vector_length(&module->vsymt); + struct hash_table_iter hti; + void *ptr; + struct symt_idx_to_ptr *idx_to_ptr; + /* place enough storage on the stack to represent a pointer in %p form */ + char ptrbuf[3 + (sizeof(void *) * 2)]; + + /* make a string representation of the pointer to use as a hash key */ + sprintf(ptrbuf, "%p", sym); + hash_table_iter_init(&module->ht_symaddr, &hti, ptrbuf); + + /* try to find the pointer in our ht */ + while ((ptr = hash_table_iter_up(&hti))) { + idx_to_ptr = GET_ENTRY(ptr, struct symt_idx_to_ptr, hash_elt); + if (idx_to_ptr->sym == sym) + return idx_to_ptr->idx; + } + /* not found */ + /* add the symbol to our symbol vector */ c = vector_add(&module->vsymt, &module->pool); + + /* add an idx to ptr mapping so we can find it again by address */ + if ((idx_to_ptr = pool_alloc(&module->pool, sizeof(*idx_to_ptr)))) + { + idx_to_ptr->hash_elt.name = pool_strdup(&module->pool, ptrbuf); + idx_to_ptr->sym = sym; + idx_to_ptr->idx = len + 1; + hash_table_add(&module->ht_symaddr, &idx_to_ptr->hash_elt); + } + if (c) *c = sym; return len + 1; #else
11 years, 3 months
1
0
0
0
[akhaldi] 59934: [NPFS/KERNEL32] * Back out r59915 for a moment so we can use Patchbot.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Sep 1 10:16:29 2013 New Revision: 59934 URL:
http://svn.reactos.org/svn/reactos?rev=59934&view=rev
Log: [NPFS/KERNEL32] * Back out r59915 for a moment so we can use Patchbot. Modified: trunk/reactos/dll/win32/kernel32/client/file/npipe.c trunk/reactos/drivers/filesystems/npfs/create.c trunk/reactos/drivers/filesystems/npfs/fsctrl.c Modified: trunk/reactos/dll/win32/kernel32/client/file/npipe.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/client/file/npipe.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/client/file/npipe.c [iso-8859-1] Sun Sep 1 10:16:29 2013 @@ -13,6 +13,8 @@ #define NDEBUG #include <debug.h> DEBUG_CHANNEL(kernel32file); + +//#define USING_PROPER_NPFS_WAIT_SEMANTICS /* GLOBALS ********************************************************************/ @@ -362,6 +364,17 @@ return r; } + +/* + * When NPFS will work properly, use this code instead. It is compatible with + * Microsoft's NPFS.SYS. The main difference is that: + * - This code actually respects the timeout instead of ignoring it! + * - This code validates and creates the proper names for both UNC and local pipes + * - On NT, you open the *root* pipe directory (either \DosDevices\Pipe or + * \DosDevices\Unc\Server\Pipe) and then send the pipe to wait on in the + * FILE_PIPE_WAIT_FOR_BUFFER structure. + */ +#ifdef USING_PROPER_NPFS_WAIT_SEMANTICS /* * @implemented */ @@ -546,6 +559,96 @@ /* Success */ return TRUE; } +#else +/* + * @implemented + */ +BOOL +WINAPI +WaitNamedPipeW(LPCWSTR lpNamedPipeName, + DWORD nTimeOut) +{ + UNICODE_STRING NamedPipeName; + NTSTATUS Status; + OBJECT_ATTRIBUTES ObjectAttributes; + FILE_PIPE_WAIT_FOR_BUFFER WaitPipe; + HANDLE FileHandle; + IO_STATUS_BLOCK Iosb; + + if (RtlDosPathNameToNtPathName_U(lpNamedPipeName, + &NamedPipeName, + NULL, + NULL) == FALSE) + { + return FALSE; + } + + InitializeObjectAttributes(&ObjectAttributes, + &NamedPipeName, + OBJ_CASE_INSENSITIVE, + NULL, + NULL); + Status = NtOpenFile(&FileHandle, + FILE_READ_ATTRIBUTES | SYNCHRONIZE, + &ObjectAttributes, + &Iosb, + FILE_SHARE_READ | FILE_SHARE_WRITE, + FILE_SYNCHRONOUS_IO_NONALERT); + if (!NT_SUCCESS(Status)) + { + BaseSetLastNTError(Status); + RtlFreeUnicodeString(&NamedPipeName); + return FALSE; + } + + /* Check what timeout we got */ + if (nTimeOut == NMPWAIT_WAIT_FOREVER) + { + /* Don't use a timeout */ + WaitPipe.TimeoutSpecified = FALSE; + } + else + { + /* Check if default */ + if (nTimeOut == NMPWAIT_USE_DEFAULT_WAIT) + { + /* Set it to 0 */ + WaitPipe.Timeout.LowPart = 0; + WaitPipe.Timeout.HighPart = 0; + } + else + { + /* Convert to NT format */ + WaitPipe.Timeout.QuadPart = UInt32x32To64(-10000, nTimeOut); + } + + /* In both cases, we do have a timeout */ + WaitPipe.TimeoutSpecified = TRUE; + } + + Status = NtFsControlFile(FileHandle, + NULL, + NULL, + NULL, + &Iosb, + FSCTL_PIPE_WAIT, + &WaitPipe, + sizeof(WaitPipe), + NULL, + 0); + NtClose(FileHandle); + if (!NT_SUCCESS(Status)) + { + BaseSetLastNTError(Status); + RtlFreeUnicodeString(&NamedPipeName); + return FALSE; + } + + RtlFreeUnicodeString(&NamedPipeName); + return TRUE; +} +#endif + /* * @implemented Modified: trunk/reactos/drivers/filesystems/npfs/create.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs/c…
============================================================================== --- trunk/reactos/drivers/filesystems/npfs/create.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/npfs/create.c [iso-8859-1] Sun Sep 1 10:16:29 2013 @@ -12,6 +12,8 @@ #define NDEBUG #include <debug.h> + +//#define USING_PROPER_NPFS_WAIT_SEMANTICS /* FUNCTIONS *****************************************************************/ @@ -249,6 +251,10 @@ PNPFS_CCB ServerCcb = NULL; PNPFS_VCB Vcb; NTSTATUS Status; +#ifndef USING_PROPER_NPFS_WAIT_SEMANTICS + ACCESS_MASK DesiredAccess; + BOOLEAN SpecialAccess; +#endif DPRINT("NpfsCreate(DeviceObject %p Irp %p)\n", DeviceObject, Irp); @@ -257,11 +263,22 @@ FileObject = IoStack->FileObject; RelatedFileObject = FileObject->RelatedFileObject; FileName = &FileObject->FileName; +#ifndef USING_PROPER_NPFS_WAIT_SEMANTICS + DesiredAccess = IoStack->Parameters.CreatePipe.SecurityContext->DesiredAccess; +#endif DPRINT("FileObject %p\n", FileObject); DPRINT("FileName %wZ\n", &FileObject->FileName); Irp->IoStatus.Information = 0; + +#ifndef USING_PROPER_NPFS_WAIT_SEMANTICS + SpecialAccess = ((DesiredAccess & SPECIFIC_RIGHTS_ALL) == FILE_READ_ATTRIBUTES); + if (SpecialAccess) + { + DPRINT("NpfsCreate() open client end for special use!\n"); + } +#endif DPRINT("FileName->Length: %hu RelatedFileObject: %p\n", FileName->Length, RelatedFileObject); @@ -336,7 +353,11 @@ ClientCcb->FileObject = FileObject; ClientCcb->Thread = (struct ETHREAD *)Irp->Tail.Overlay.Thread; ClientCcb->PipeEnd = FILE_PIPE_CLIENT_END; +#ifndef USING_PROPER_NPFS_WAIT_SEMANTICS + ClientCcb->PipeState = SpecialAccess ? 0 : FILE_PIPE_DISCONNECTED_STATE; +#else ClientCcb->PipeState = FILE_PIPE_DISCONNECTED_STATE; +#endif InitializeListHead(&ClientCcb->ReadRequestListHead); DPRINT("CCB: %p\n", ClientCcb); @@ -377,62 +398,85 @@ /* * Step 3. Search for listening server CCB. */ - /* - * WARNING: Point of no return! Once we get the server CCB it's - * possible that we completed a wait request and so we have to - * complete even this request. - */ - - ServerCcb = NpfsFindListeningServerInstance(Fcb); - if (ServerCcb == NULL) - { - PLIST_ENTRY CurrentEntry; - PNPFS_CCB Ccb; - +#ifndef USING_PROPER_NPFS_WAIT_SEMANTICS + if (!SpecialAccess) + { +#endif /* - * If no waiting server CCB was found then try to pick - * one of the listing server CCB on the pipe. + * WARNING: Point of no return! Once we get the server CCB it's + * possible that we completed a wait request and so we have to + * complete even this request. */ - CurrentEntry = Fcb->ServerCcbListHead.Flink; - while (CurrentEntry != &Fcb->ServerCcbListHead) - { - Ccb = CONTAINING_RECORD(CurrentEntry, NPFS_CCB, CcbListEntry); - if (Ccb->PipeState == FILE_PIPE_LISTENING_STATE) + ServerCcb = NpfsFindListeningServerInstance(Fcb); + if (ServerCcb == NULL) + { + PLIST_ENTRY CurrentEntry; + PNPFS_CCB Ccb; + + /* + * If no waiting server CCB was found then try to pick + * one of the listing server CCB on the pipe. + */ + + CurrentEntry = Fcb->ServerCcbListHead.Flink; + while (CurrentEntry != &Fcb->ServerCcbListHead) { - ServerCcb = Ccb; - break; + Ccb = CONTAINING_RECORD(CurrentEntry, NPFS_CCB, CcbListEntry); + if (Ccb->PipeState == FILE_PIPE_LISTENING_STATE) + { + ServerCcb = Ccb; + break; + } + CurrentEntry = CurrentEntry->Flink; } - CurrentEntry = CurrentEntry->Flink; - } - - /* - * No one is listening to me?! I'm so lonely... :( - */ - - if (ServerCcb == NULL) - { - /* Not found, bail out with error for FILE_OPEN requests. */ - DPRINT("No listening server CCB found!\n"); - if (ClientCcb->Data) + + /* + * No one is listening to me?! I'm so lonely... :( + */ + + if (ServerCcb == NULL) { - ExFreePoolWithTag(ClientCcb->Data, TAG_NPFS_CCB_DATA); + /* Not found, bail out with error for FILE_OPEN requests. */ + DPRINT("No listening server CCB found!\n"); + if (ClientCcb->Data) + { + ExFreePoolWithTag(ClientCcb->Data, TAG_NPFS_CCB_DATA); + } + + NpfsDereferenceCcb(ClientCcb); + KeUnlockMutex(&Fcb->CcbListLock); + NpfsDereferenceFcb(Fcb); + Irp->IoStatus.Status = STATUS_OBJECT_NAME_NOT_FOUND; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return STATUS_OBJECT_NAME_NOT_FOUND; } - - NpfsDereferenceCcb(ClientCcb); - KeUnlockMutex(&Fcb->CcbListLock); - NpfsDereferenceFcb(Fcb); - Irp->IoStatus.Status = STATUS_OBJECT_NAME_NOT_FOUND; - IoCompleteRequest(Irp, IO_NO_INCREMENT); - return STATUS_OBJECT_NAME_NOT_FOUND; - } - } - else - { - /* Signal the server thread and remove it from the waiter list */ - /* FIXME: Merge this with the NpfsFindListeningServerInstance routine. */ - NpfsSignalAndRemoveListeningServerInstance(Fcb, ServerCcb); - } + } + else + { + /* Signal the server thread and remove it from the waiter list */ + /* FIXME: Merge this with the NpfsFindListeningServerInstance routine. */ + NpfsSignalAndRemoveListeningServerInstance(Fcb, ServerCcb); + } +#ifndef USING_PROPER_NPFS_WAIT_SEMANTICS + } + else if (IsListEmpty(&Fcb->ServerCcbListHead)) + { + DPRINT("No server fcb found!\n"); + + if (ClientCcb->Data) + { + ExFreePoolWithTag(ClientCcb->Data, TAG_NPFS_CCB_DATA); + } + + NpfsDereferenceCcb(ClientCcb); + KeUnlockMutex(&Fcb->CcbListLock); + NpfsDereferenceFcb(Fcb); + Irp->IoStatus.Status = STATUS_UNSUCCESSFUL; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return STATUS_UNSUCCESSFUL; + } +#endif /* * Step 4. Add the client CCB to a list and connect it if possible. Modified: trunk/reactos/drivers/filesystems/npfs/fsctrl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs/f…
============================================================================== --- trunk/reactos/drivers/filesystems/npfs/fsctrl.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/npfs/fsctrl.c [iso-8859-1] Sun Sep 1 10:16:29 2013 @@ -14,6 +14,8 @@ #define NDEBUG #include <debug.h> + +//#define USING_PROPER_NPFS_WAIT_SEMANTICS /* FUNCTIONS *****************************************************************/ @@ -317,8 +319,108 @@ return Status; } +static NTSTATUS +NpfsWaitPipe(PIRP Irp, + PNPFS_CCB Ccb) +{ + PLIST_ENTRY current_entry; + PNPFS_FCB Fcb; + PNPFS_CCB ServerCcb; + PFILE_PIPE_WAIT_FOR_BUFFER WaitPipe; + PLARGE_INTEGER TimeOut; + NTSTATUS Status; + PEXTENDED_IO_STACK_LOCATION IoStack; + PFILE_OBJECT FileObject; + PNPFS_VCB Vcb; + + IoStack = (PEXTENDED_IO_STACK_LOCATION)IoGetCurrentIrpStackLocation(Irp); + ASSERT(IoStack); + FileObject = IoStack->FileObject; + ASSERT(FileObject); + + DPRINT("Waiting on Pipe %wZ\n", &FileObject->FileName); + + WaitPipe = (PFILE_PIPE_WAIT_FOR_BUFFER)Irp->AssociatedIrp.SystemBuffer; + + ASSERT(Ccb->Fcb); + ASSERT(Ccb->Fcb->Vcb); + + /* Get the VCB */ + Vcb = Ccb->Fcb->Vcb; + + /* Lock the pipe list */ + KeLockMutex(&Vcb->PipeListLock); + + /* File a pipe with the given name */ + Fcb = NpfsFindPipe(Vcb, + &FileObject->FileName); + + /* Unlock the pipe list */ + KeUnlockMutex(&Vcb->PipeListLock); + + /* Fail if not pipe was found */ + if (Fcb == NULL) + { + DPRINT("No pipe found!\n"); + return STATUS_OBJECT_NAME_NOT_FOUND; + } + + /* search for listening server */ + current_entry = Fcb->ServerCcbListHead.Flink; + while (current_entry != &Fcb->ServerCcbListHead) + { + ServerCcb = CONTAINING_RECORD(current_entry, + NPFS_CCB, + CcbListEntry); + + if (ServerCcb->PipeState == FILE_PIPE_LISTENING_STATE) + { + /* found a listening server CCB */ + DPRINT("Listening server CCB found -- connecting\n"); + NpfsDereferenceFcb(Fcb); + return STATUS_SUCCESS; + } + + current_entry = current_entry->Flink; + } + + /* No listening server fcb found, so wait for one */ + + /* If a timeout specified */ + if (WaitPipe->TimeoutSpecified) + { + /* NMPWAIT_USE_DEFAULT_WAIT = 0 */ + if (WaitPipe->Timeout.QuadPart == 0) + { + TimeOut = &Fcb->TimeOut; + } + else + { + TimeOut = &WaitPipe->Timeout; + } + } + else + { + /* Wait forever */ + TimeOut = NULL; + } + NpfsDereferenceFcb(Fcb); + + Status = KeWaitForSingleObject(&Ccb->ConnectEvent, + UserRequest, + Irp->RequestorMode, + (Ccb->FileObject->Flags & FO_ALERTABLE_IO) != 0, + TimeOut); + if ((Status == STATUS_USER_APC) || (Status == STATUS_KERNEL_APC) || (Status == STATUS_ALERTED)) + Status = STATUS_CANCELLED; + + DPRINT("KeWaitForSingleObject() returned (Status %lx)\n", Status); + + return Status; +} + NTSTATUS -NpfsWaitPipe(PIRP Irp, +NpfsWaitPipe2(PIRP Irp, PNPFS_CCB Ccb) { PLIST_ENTRY current_entry; @@ -327,12 +429,16 @@ PFILE_PIPE_WAIT_FOR_BUFFER WaitPipe; LARGE_INTEGER TimeOut; NTSTATUS Status; +#ifdef USING_PROPER_NPFS_WAIT_SEMANTICS PNPFS_VCB Vcb; UNICODE_STRING PipeName; +#endif + DPRINT("NpfsWaitPipe\n"); WaitPipe = (PFILE_PIPE_WAIT_FOR_BUFFER)Irp->AssociatedIrp.SystemBuffer; +#ifdef USING_PROPER_NPFS_WAIT_SEMANTICS /* Fail, if the CCB does not represent the root directory */ if (Ccb->Type != CCB_DIRECTORY) return STATUS_ILLEGAL_FUNCTION; @@ -382,6 +488,15 @@ } DPRINT("Fcb %p\n", Fcb); +#else + Fcb = Ccb->Fcb; + + if (Ccb->PipeState != 0) + { + DPRINT("Pipe is not in passive (waiting) state!\n"); + return STATUS_UNSUCCESSFUL; + } +#endif /* search for listening server */ current_entry = Fcb->ServerCcbListHead.Flink; @@ -395,7 +510,9 @@ { /* found a listening server CCB */ DPRINT("Listening server CCB found -- connecting\n"); +#ifdef USING_PROPER_NPFS_WAIT_SEMANTICS NpfsDereferenceFcb(Fcb); +#endif return STATUS_SUCCESS; } @@ -409,8 +526,9 @@ TimeOut = WaitPipe->Timeout; else TimeOut = Fcb->TimeOut; - +#ifdef USING_PROPER_NPFS_WAIT_SEMANTICS NpfsDereferenceFcb(Fcb); +#endif /* Wait for one */ Status = KeWaitForSingleObject(&Ccb->ConnectEvent,
11 years, 3 months
1
0
0
0
[hbelusca] 59933: [CMAKE]: Fix a comment typo only. [NTDLL-KERNEL32-BASESRV-WINSRV]: Specify by hand (hackz for MSVC builds) that the dll will be a "Console DLL" (ie. not a native one nor a Gui DLL...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sun Sep 1 00:11:56 2013 New Revision: 59933 URL:
http://svn.reactos.org/svn/reactos?rev=59933&view=rev
Log: [CMAKE]: Fix a comment typo only. [NTDLL-KERNEL32-BASESRV-WINSRV]: Specify by hand (hackz for MSVC builds) that the dll will be a "Console DLL" (ie. not a native one nor a Gui DLL). [BASESRV]: Explicitely set the DLL entry point to DllMain (unusued). [WINSRV]: Explicitely set the DLL entry point to DllMain (unusued) AND REMOVE usage of msvcrt (that might pose problems when testing with Windows msvcrt etc...) and use libcntpr instead. Thanks to Amine for having helped me in solving a problem with delayed imports. Modified: trunk/reactos/cmake/msvc.cmake trunk/reactos/dll/ntdll/CMakeLists.txt trunk/reactos/dll/win32/kernel32/CMakeLists.txt trunk/reactos/subsystems/win/basesrv/CMakeLists.txt trunk/reactos/subsystems/win32/csrsrv/CMakeLists.txt trunk/reactos/subsystems/win32/csrss/CMakeLists.txt trunk/reactos/win32ss/user/winsrv/CMakeLists.txt Modified: trunk/reactos/cmake/msvc.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/msvc.cmake?rev=59933…
============================================================================== --- trunk/reactos/cmake/msvc.cmake [iso-8859-1] (original) +++ trunk/reactos/cmake/msvc.cmake [iso-8859-1] Sun Sep 1 00:11:56 2013 @@ -192,7 +192,7 @@ set(SPEC2DEF_ARCH i386) endif() function(spec2def _dllname _spec_file) - # do we also want to add impotlib targets? + # do we also want to add importlib targets? if(${ARGC} GREATER 2) if(${ARGN} STREQUAL "ADD_IMPORTLIB") set(__add_importlib TRUE) Modified: trunk/reactos/dll/ntdll/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/CMakeLists.txt?r…
============================================================================== --- trunk/reactos/dll/ntdll/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/ntdll/CMakeLists.txt [iso-8859-1] Sun Sep 1 00:11:56 2013 @@ -39,6 +39,10 @@ add_library(ntdll SHARED ${SOURCE} ${ntdll_asm}) set_module_type(ntdll win32dll ENTRYPOINT 0) +############################################# +## HACK FOR MSVC COMPILATION WITH win32dll ## +set_subsystem(ntdll console) +################# END HACK ################# if(MSVC) add_target_link_flags(ntdll "/RELEASE") Modified: trunk/reactos/dll/win32/kernel32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/CMakeLi…
============================================================================== --- trunk/reactos/dll/win32/kernel32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/CMakeLists.txt [iso-8859-1] Sun Sep 1 00:11:56 2013 @@ -95,8 +95,15 @@ add_asm_files(kernel32_asm ${ASM_SOURCE}) add_library(kernel32 SHARED ${SOURCE} ${kernel32_asm}) + set_module_type(kernel32 win32dll ENTRYPOINT DllMain 12) +############################################# +## HACK FOR MSVC COMPILATION WITH win32dll ## +set_subsystem(kernel32 console) +################# END HACK ################# + target_link_libraries(kernel32 wine chkstk ${PSEH_LIB}) + add_importlibs(kernel32 ntdll) add_pch(kernel32 k32.h) add_dependencies(kernel32 psdk errcodes asm) Modified: trunk/reactos/subsystems/win/basesrv/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win/basesrv/CMa…
============================================================================== --- trunk/reactos/subsystems/win/basesrv/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/subsystems/win/basesrv/CMakeLists.txt [iso-8859-1] Sun Sep 1 00:11:56 2013 @@ -14,12 +14,15 @@ ${CMAKE_CURRENT_BINARY_DIR}/basesrv.def) add_library(basesrv SHARED ${SOURCE}) +set_module_type(basesrv win32dll UNICODE ENTRYPOINT DllMain 12) +############################################# +## HACK FOR MSVC COMPILATION WITH win32dll ## +set_subsystem(basesrv console) +################# END HACK ################# target_link_libraries(basesrv ${PSEH_LIB}) -set_module_type(basesrv nativedll) # win32dll - -add_importlibs(basesrv ntdll csrsrv) +add_importlibs(basesrv csrsrv ntdll) add_dependencies(basesrv bugcodes) add_cd_file(TARGET basesrv DESTINATION reactos/system32 FOR all) Modified: trunk/reactos/subsystems/win32/csrsrv/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrsrv/CM…
============================================================================== --- trunk/reactos/subsystems/win32/csrsrv/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/csrsrv/CMakeLists.txt [iso-8859-1] Sun Sep 1 00:11:56 2013 @@ -16,10 +16,9 @@ ${CMAKE_CURRENT_BINARY_DIR}/csrsrv.def) add_library(csrsrv SHARED ${SOURCE}) +set_module_type(csrsrv nativedll) target_link_libraries(csrsrv ${PSEH_LIB} smlib) - -set_module_type(csrsrv nativedll) add_importlibs(csrsrv ntdll smdll) Modified: trunk/reactos/subsystems/win32/csrss/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/CMa…
============================================================================== --- trunk/reactos/subsystems/win32/csrss/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/csrss/CMakeLists.txt [iso-8859-1] Sun Sep 1 00:11:56 2013 @@ -4,9 +4,11 @@ ${REACTOS_SOURCE_DIR}/include/reactos/subsys) add_executable(csrss csrss.c csrss.rc) +set_module_type(csrss nativecui) -set_module_type(csrss nativecui) target_link_libraries(csrss nt) -add_importlibs(csrss ntdll csrsrv) + +add_importlibs(csrss csrsrv ntdll) + add_dependencies(csrss psdk bugcodes) add_cd_file(TARGET csrss DESTINATION reactos/system32 FOR all) Modified: trunk/reactos/win32ss/user/winsrv/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/CMakeL…
============================================================================== --- trunk/reactos/win32ss/user/winsrv/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/winsrv/CMakeLists.txt [iso-8859-1] Sun Sep 1 00:11:56 2013 @@ -15,16 +15,19 @@ ${CMAKE_CURRENT_BINARY_DIR}/winsrv.def) add_library(winsrv SHARED ${SOURCE}) +set_module_type(winsrv win32dll UNICODE ENTRYPOINT DllMain 12) +############################################# +## HACK FOR MSVC COMPILATION WITH win32dll ## +set_subsystem(winsrv console) +################# END HACK ################# # Add the components target_link_libraries(winsrv consrv usersrv) # Add win32ksys because of NtUser...() -target_link_libraries(winsrv win32ksys ${PSEH_LIB} ${CONSRV_TARGET_LINK_LIBS}) +target_link_libraries(winsrv win32ksys libcntpr ${PSEH_LIB} ${CONSRV_TARGET_LINK_LIBS}) -set_module_type(winsrv win32dll UNICODE) - -add_importlibs(winsrv msvcrt kernel32 ntdll csrsrv ${CONSRV_IMPORT_LIBS}) -add_delay_importlibs(winsrv user32 gdi32 advapi32 ${CONSRV_DELAY_IMPORT_LIBS}) +add_delay_importlibs(winsrv advapi32 gdi32 user32 ${CONSRV_DELAY_IMPORT_LIBS}) +add_importlibs(winsrv csrsrv kernel32 ntdll ${CONSRV_IMPORT_LIBS}) add_dependencies(winsrv bugcodes) add_cd_file(TARGET winsrv DESTINATION reactos/system32 FOR all)
11 years, 3 months
1
0
0
0
← Newer
1
...
53
54
55
56
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
Results per page:
10
25
50
100
200