ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
December 2010
----- 2025 -----
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
20 participants
369 discussions
Start a n
N
ew thread
[tkreuzer] 49907: [SPEC2DEF] Fix syntax descrption
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Thu Dec 2 23:36:51 2010 New Revision: 49907 URL:
http://svn.reactos.org/svn/reactos?rev=49907&view=rev
Log: [SPEC2DEF] Fix syntax descrption Modified: branches/cmake-bringup/tools/spec2def/spec2def.c Modified: branches/cmake-bringup/tools/spec2def/spec2def.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/tools/spec2def/sp…
============================================================================== --- branches/cmake-bringup/tools/spec2def/spec2def.c [iso-8859-1] (original) +++ branches/cmake-bringup/tools/spec2def/spec2def.c [iso-8859-1] Thu Dec 2 23:36:51 2010 @@ -593,7 +593,7 @@ void usage(void) { - printf("syntax: spec2pdef [<options> ...] <source file> <dest file>\n" + printf("syntax: spec2pdef [<options> ...] <spec file>\n" "Possible options:\n" " -h --help prints this screen\n" " -l=<file> generates an asm lib stub\n"
14 years, 1 month
1
0
0
0
[akhaldi] 49906: [CMAKE] - WIP: Make rossym and its users rely on dwarf debug info. Brought to you by the Arty.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Dec 2 23:20:22 2010 New Revision: 49906 URL:
http://svn.reactos.org/svn/reactos?rev=49906&view=rev
Log: [CMAKE] - WIP: Make rossym and its users rely on dwarf debug info. Brought to you by the Arty. Added: branches/cmake-bringup/lib/rossym/compat.h (with props) branches/cmake-bringup/lib/rossym/dwarf.h (with props) branches/cmake-bringup/lib/rossym/dwarf386.c (with props) branches/cmake-bringup/lib/rossym/dwarfabbrev.c (with props) branches/cmake-bringup/lib/rossym/dwarfaranges.c (with props) branches/cmake-bringup/lib/rossym/dwarfcfa.c (with props) branches/cmake-bringup/lib/rossym/dwarfdump.c (with props) branches/cmake-bringup/lib/rossym/dwarfeval.c (with props) branches/cmake-bringup/lib/rossym/dwarfget.c (with props) branches/cmake-bringup/lib/rossym/dwarfinfo.c (with props) branches/cmake-bringup/lib/rossym/dwarfopen.c (with props) branches/cmake-bringup/lib/rossym/dwarfpc.c (with props) branches/cmake-bringup/lib/rossym/dwarfpubnames.c (with props) branches/cmake-bringup/lib/rossym/pe.c (with props) branches/cmake-bringup/lib/rossym/pe.h (with props) Modified: branches/cmake-bringup/boot/freeldr/freeldr/windows/setupldr2.c branches/cmake-bringup/boot/freeldr/freeldr/windows/winldr.c branches/cmake-bringup/include/reactos/rossym.h branches/cmake-bringup/lib/rossym/CMakeLists.txt branches/cmake-bringup/lib/rossym/delete.c branches/cmake-bringup/lib/rossym/find.c branches/cmake-bringup/lib/rossym/fromfile.c branches/cmake-bringup/lib/rossym/frommem.c branches/cmake-bringup/lib/rossym/fromraw.c branches/cmake-bringup/lib/rossym/getraw.c branches/cmake-bringup/lib/rossym/initkm.c branches/cmake-bringup/lib/rossym/initum.c branches/cmake-bringup/lib/rossym/rossympriv.h branches/cmake-bringup/lib/rossym/zwfile.c branches/cmake-bringup/ntoskrnl/kdbg/kdb_symbols.c branches/cmake-bringup/ntoskrnl/ntoskrnl_i386.lnk branches/cmake-bringup/tools/rsym/rsym.c branches/cmake-bringup/tools/rsym/rsym64.h [This mail would be too long, it was shortened to contain the URLs only.] Modified: branches/cmake-bringup/boot/freeldr/freeldr/windows/setupldr2.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/boot/freeldr/free…
Modified: branches/cmake-bringup/boot/freeldr/freeldr/windows/winldr.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/boot/freeldr/free…
Modified: branches/cmake-bringup/include/reactos/rossym.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/include/reactos/r…
Modified: branches/cmake-bringup/lib/rossym/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/CMakeL…
Added: branches/cmake-bringup/lib/rossym/compat.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/compat…
Modified: branches/cmake-bringup/lib/rossym/delete.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/delete…
Added: branches/cmake-bringup/lib/rossym/dwarf.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/dwarf.…
Added: branches/cmake-bringup/lib/rossym/dwarf386.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/dwarf3…
Added: branches/cmake-bringup/lib/rossym/dwarfabbrev.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/dwarfa…
Added: branches/cmake-bringup/lib/rossym/dwarfaranges.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/dwarfa…
Added: branches/cmake-bringup/lib/rossym/dwarfcfa.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/dwarfc…
Added: branches/cmake-bringup/lib/rossym/dwarfdump.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/dwarfd…
Added: branches/cmake-bringup/lib/rossym/dwarfeval.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/dwarfe…
Added: branches/cmake-bringup/lib/rossym/dwarfget.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/dwarfg…
Added: branches/cmake-bringup/lib/rossym/dwarfinfo.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/dwarfi…
Added: branches/cmake-bringup/lib/rossym/dwarfopen.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/dwarfo…
Added: branches/cmake-bringup/lib/rossym/dwarfpc.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/dwarfp…
Added: branches/cmake-bringup/lib/rossym/dwarfpubnames.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/dwarfp…
Modified: branches/cmake-bringup/lib/rossym/find.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/find.c…
Modified: branches/cmake-bringup/lib/rossym/fromfile.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/fromfi…
Modified: branches/cmake-bringup/lib/rossym/frommem.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/fromme…
Modified: branches/cmake-bringup/lib/rossym/fromraw.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/fromra…
Modified: branches/cmake-bringup/lib/rossym/getraw.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/getraw…
Modified: branches/cmake-bringup/lib/rossym/initkm.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/initkm…
Modified: branches/cmake-bringup/lib/rossym/initum.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/initum…
Added: branches/cmake-bringup/lib/rossym/pe.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/pe.c?r…
Added: branches/cmake-bringup/lib/rossym/pe.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/pe.h?r…
Modified: branches/cmake-bringup/lib/rossym/rossympriv.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/rossym…
Modified: branches/cmake-bringup/lib/rossym/zwfile.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/zwfile…
Modified: branches/cmake-bringup/ntoskrnl/kdbg/kdb_symbols.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/ntoskrnl/kdbg/kdb…
Modified: branches/cmake-bringup/ntoskrnl/ntoskrnl_i386.lnk URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/ntoskrnl/ntoskrnl…
Modified: branches/cmake-bringup/tools/rsym/rsym.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/tools/rsym/rsym.c…
Modified: branches/cmake-bringup/tools/rsym/rsym64.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/tools/rsym/rsym64…
14 years, 1 month
1
0
0
0
[tkreuzer] 49905: [CMAKE] Fix compilation of setupldr on msvc
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Thu Dec 2 22:24:58 2010 New Revision: 49905 URL:
http://svn.reactos.org/svn/reactos?rev=49905&view=rev
Log: [CMAKE] Fix compilation of setupldr on msvc Modified: branches/cmake-bringup/boot/CMakeLists.txt Modified: branches/cmake-bringup/boot/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/boot/CMakeLists.t…
============================================================================== --- branches/cmake-bringup/boot/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/boot/CMakeLists.txt [iso-8859-1] Thu Dec 2 22:24:58 2010 @@ -12,7 +12,7 @@ if(ARCH MATCHES arm) if(SARCH MATCHES omap-zoom2) add_definitions(-D_ZOOM2_) - endif() + endif() endif() if(ARCH MATCHES i386) @@ -222,7 +222,7 @@ set_target_properties(setupldr PROPERTIES LINK_FLAGS "-Wl,--strip-all -Wl,--exclude-all-symbols -Wl,--file-alignment,0x1000 -Wl,-T,${CMAKE_CURRENT_SOURCE_DIR}/freeldr/freeldr/freeldr_i386.lnk" SUFFIX ".sys" COMPILE_DEFINITIONS "FREELDR_REACTOS_SETUP") set_image_base(setupldr 0x8000) else() -set_target_properties(setupldr PROPERTIES LINK_FLAGS "/SECTION:.text,ERWP,ALIGN=0x1000" SUFFIX ".sys" COMPILE_DEFINITIONS "FREELDR_REACTOS_SETUP") +set_target_properties(setupldr PROPERTIES LINK_FLAGS "/DRIVER /SECTION:.text,ERWP,ALIGN=0x1000" SUFFIX ".sys" COMPILE_DEFINITIONS "FREELDR_REACTOS_SETUP") endif() set_subsystem(setupldr native)
14 years, 1 month
1
0
0
0
[tkreuzer] 49904: [CMAKE] Invoke spec2def only once to generate asm stub and def file.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Thu Dec 2 22:16:59 2010 New Revision: 49904 URL:
http://svn.reactos.org/svn/reactos?rev=49904&view=rev
Log: [CMAKE] Invoke spec2def only once to generate asm stub and def file. Modified: branches/cmake-bringup/msc.cmake Modified: branches/cmake-bringup/msc.cmake URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/msc.cmake?rev=499…
============================================================================== --- branches/cmake-bringup/msc.cmake [iso-8859-1] (original) +++ branches/cmake-bringup/msc.cmake [iso-8859-1] Thu Dec 2 22:16:59 2010 @@ -142,15 +142,13 @@ macro(add_importlib_target _spec_file) get_filename_component(_name ${_spec_file} NAME_WE) + # Generate the asm stub file and the export def file add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.asm ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def - # Generate the asm stub file - COMMAND native-spec2def -l=${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.asm ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file} - # Generate a the export def file - COMMAND native-spec2def -@ -r -d=${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file} + COMMAND native-spec2def -@ -r -d=${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def -l=${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.asm ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file}) - # Assemble the file + # Assemble the stub file add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.obj COMMAND ${CMAKE_ASM_COMPILER} /nologo /Fo${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.obj /c /Ta ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.asm
14 years, 1 month
1
0
0
0
[akhaldi] 49903: [CMAKE] - Group some cross compiling related sections. - Implement add_importlib_target() for gcc. - Improve the msvc version.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Dec 2 21:56:40 2010 New Revision: 49903 URL:
http://svn.reactos.org/svn/reactos?rev=49903&view=rev
Log: [CMAKE] - Group some cross compiling related sections. - Implement add_importlib_target() for gcc. - Improve the msvc version. Modified: branches/cmake-bringup/CMakeLists.txt branches/cmake-bringup/gcc.cmake branches/cmake-bringup/msc.cmake Modified: branches/cmake-bringup/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/CMakeLists.txt?re…
============================================================================== --- branches/cmake-bringup/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/CMakeLists.txt [iso-8859-1] Thu Dec 2 21:56:40 2010 @@ -1,29 +1,9 @@ + cmake_minimum_required(VERSION 2.8) project(REACTOS) # Compile options include(config.cmake) - -# Compiler specific definitions and macros -if(MSVC) -include(msc.cmake) -else() -include(gcc.cmake) -endif(MSVC) - -# Generic macros -include(CMakeMacros.cmake) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) -set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON) -set(CMAKE_SHARED_LIBRARY_PREFIX "") - -set(CMAKE_SKIP_PREPROCESSED_SOURCE_RULES TRUE) -set(CMAKE_SKIP_ASSEMBLY_SOURCE_RULES TRUE) - -set_property(GLOBAL PROPERTY RULE_MESSAGES OFF) - -add_definitions(-D__REACTOS__) if(NOT CMAKE_CROSSCOMPILING) @@ -47,6 +27,40 @@ endif() else() + +if(NOT DEFINED REACTOS_BUILD_TOOLS_DIR) + set(REACTOS_BUILD_TOOLS_DIR ${REACTOS_SOURCE_DIR}/build) +endif() + +set(IMPORT_EXECUTABLES "${REACTOS_BUILD_TOOLS_DIR}/ImportExecutables.cmake" CACHE FILEPATH "Host executables") +include(${IMPORT_EXECUTABLES}) + +endif(NOT CMAKE_CROSSCOMPILING) + +# Compiler specific definitions and macros +if(MSVC) +include(msc.cmake) +else() +include(gcc.cmake) +endif(MSVC) + +# Generic macros +include(CMakeMacros.cmake) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) +set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON) +set(CMAKE_SHARED_LIBRARY_PREFIX "") + +set(CMAKE_SKIP_PREPROCESSED_SOURCE_RULES TRUE) +set(CMAKE_SKIP_ASSEMBLY_SOURCE_RULES TRUE) + +set(CMAKE_COLOR_MAKEFILE OFF) + +set_property(GLOBAL PROPERTY RULE_MESSAGES OFF) + +add_definitions(-D__REACTOS__) + +if(CMAKE_CROSSCOMPILING) #Some cleanup file(REMOVE @@ -66,13 +80,6 @@ # Activate language support for resource files enable_language(RC) - -if(NOT DEFINED REACTOS_BUILD_TOOLS_DIR) - set(REACTOS_BUILD_TOOLS_DIR ${REACTOS_SOURCE_DIR}/build) -endif() - -set(IMPORT_EXECUTABLES "${REACTOS_BUILD_TOOLS_DIR}/ImportExecutables.cmake" CACHE FILEPATH "Host executables") -include(${IMPORT_EXECUTABLES}) add_definitions(-DDBG=${DBG} -DKDBG=${KDBG}) @@ -189,6 +196,8 @@ add_custom_target(gendib_generated ALL DEPENDS ${OUTPUT_FILES}) +file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/importlibs) + #bootcd and livecd include(ros_cd.cmake) Modified: branches/cmake-bringup/gcc.cmake URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/gcc.cmake?rev=499…
============================================================================== --- branches/cmake-bringup/gcc.cmake [iso-8859-1] (original) +++ branches/cmake-bringup/gcc.cmake [iso-8859-1] Thu Dec 2 21:56:40 2010 @@ -96,12 +96,6 @@ add_linkerflag(${MODULE} "-Wl,--image-base,${IMAGE_BASE}") endmacro() -macro(add_importlibs MODULE) - foreach(LIB ${ARGN}) - target_link_libraries(${MODULE} ${LIB}.dll.a) - endforeach() -endmacro() - macro(set_module_type MODULE TYPE) add_dependencies(${MODULE} psdk buildno_header) @@ -193,8 +187,23 @@ set(IDL_PROXY_ARG -p -P) set(IDL_DLLDATA_ARG --dlldata-only --dlldata=) -macro(add_importlib_target _def_file) - # empty for now, while import libs are shipped +macro(add_importlibs MODULE) + foreach(LIB ${ARGN}) + target_link_libraries(${MODULE} ${CMAKE_BINARY_DIR}/importlibs/lib${LIB}.a) + add_dependencies(${MODULE} lib${LIB}) + endforeach() +endmacro() + +macro(add_importlib_target _spec_file) + get_filename_component(_name ${_spec_file} NAME_WE) + add_custom_command( + OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}.a + COMMAND native-spec2def ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file} ${CMAKE_CURRENT_BINARY_DIR}/${_name}.def + COMMAND ${MINGW_PREFIX}dlltool --def ${CMAKE_CURRENT_BINARY_DIR}/${_name}.def --kill-at --output-lib=${CMAKE_BINARY_DIR}/importlibs/lib${_name}.a + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file}) + add_custom_target( + lib${_name} + DEPENDS ${CMAKE_BINARY_DIR}/importlibs/lib${_name}.a) endmacro() macro(spec2def _dllname _spec_file) Modified: branches/cmake-bringup/msc.cmake URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/msc.cmake?rev=499…
============================================================================== --- branches/cmake-bringup/msc.cmake [iso-8859-1] (original) +++ branches/cmake-bringup/msc.cmake [iso-8859-1] Thu Dec 2 21:56:40 2010 @@ -6,7 +6,6 @@ add_definitions(-Dinline=__inline) if(NOT CMAKE_CROSSCOMPILING) - else() @@ -143,15 +142,11 @@ macro(add_importlib_target _spec_file) get_filename_component(_name ${_spec_file} NAME_WE) - # Generate the asm stub file - add_custom_command( - OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.asm + add_custom_command( + OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.asm ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def + # Generate the asm stub file COMMAND native-spec2def -l=${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.asm ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file} - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file}) - - # Generate a the export def file - add_custom_command( - OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def + # Generate a the export def file COMMAND native-spec2def -@ -r -d=${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file}) @@ -159,8 +154,7 @@ add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.obj COMMAND ${CMAKE_ASM_COMPILER} /nologo /Fo${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.obj /c /Ta ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.asm - DEPENDS "${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.asm" - ) + DEPENDS "${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.asm") # Add neccessary importlibs for redirections set(_libraries "") @@ -173,14 +167,12 @@ add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/importlibs/lib${_name}.lib COMMAND LINK /LIB /NOLOGO /MACHINE:X86 /DEF:${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def /OUT:${CMAKE_BINARY_DIR}/importlibs/lib${_name}.lib ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.obj ${_libraries} - DEPENDS ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.obj ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def - ) + DEPENDS ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_stubs.obj ${CMAKE_BINARY_DIR}/importlibs/lib${_name}_exp.def) # Add the importlib target add_custom_target( lib${_name} - DEPENDS ${CMAKE_BINARY_DIR}/importlibs/lib${_name}.lib - ) + DEPENDS ${CMAKE_BINARY_DIR}/importlibs/lib${_name}.lib) add_dependencies(lib${_name} asm ${_dependencies}) endmacro()
14 years, 1 month
1
0
0
0
[tkreuzer] 49902: [CMAKE] On MSVC builds link eventvwr, dwnl, ftp, ping, telnet, tracert to ntdll to resolve _allmul and friends link ftp to oldnames
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Thu Dec 2 19:44:46 2010 New Revision: 49902 URL:
http://svn.reactos.org/svn/reactos?rev=49902&view=rev
Log: [CMAKE] On MSVC builds link eventvwr, dwnl, ftp, ping, telnet, tracert to ntdll to resolve _allmul and friends link ftp to oldnames Modified: branches/cmake-bringup/base/applications/calc/CMakeLists.txt branches/cmake-bringup/base/applications/mscutils/eventvwr/CMakeLists.txt branches/cmake-bringup/base/applications/network/dwnl/CMakeLists.txt branches/cmake-bringup/base/applications/network/ftp/CMakeLists.txt branches/cmake-bringup/base/applications/network/ping/CMakeLists.txt branches/cmake-bringup/base/applications/network/tracert/CMakeLists.txt Modified: branches/cmake-bringup/base/applications/calc/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/applications…
============================================================================== --- branches/cmake-bringup/base/applications/calc/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/base/applications/calc/CMakeLists.txt [iso-8859-1] Thu Dec 2 19:44:46 2010 @@ -14,5 +14,8 @@ set_module_type(calc win32gui) add_importlibs(calc advapi32 user32 gdi32 msvcrt kernel32) +if(MSVC) +add_importlibs(calc ntdll) +endif() add_cab_target(calc 1) Modified: branches/cmake-bringup/base/applications/mscutils/eventvwr/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/applications…
============================================================================== --- branches/cmake-bringup/base/applications/mscutils/eventvwr/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/base/applications/mscutils/eventvwr/CMakeLists.txt [iso-8859-1] Thu Dec 2 19:44:46 2010 @@ -6,5 +6,8 @@ set_module_type(eventvwr win32gui) add_importlibs(eventvwr user32 comctl32 advapi32 msvcrt kernel32) +if(MSVC) +add_importlibs(eventvwr ntdll) +endif() add_cab_target(eventvwr 1) Modified: branches/cmake-bringup/base/applications/network/dwnl/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/applications…
============================================================================== --- branches/cmake-bringup/base/applications/network/dwnl/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/base/applications/network/dwnl/CMakeLists.txt [iso-8859-1] Thu Dec 2 19:44:46 2010 @@ -9,5 +9,8 @@ target_link_libraries(dwnl uuid) add_importlibs(dwnl urlmon wininet msvcrt kernel32) +if(MSVC) +add_importlibs(dwnl ntdll) +endif() add_cab_target(dwnl 1) Modified: branches/cmake-bringup/base/applications/network/ftp/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/applications…
============================================================================== --- branches/cmake-bringup/base/applications/network/ftp/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/base/applications/network/ftp/CMakeLists.txt [iso-8859-1] Thu Dec 2 19:44:46 2010 @@ -13,5 +13,9 @@ set_module_type(ftp win32cui) add_importlibs(ftp ws2_32 iphlpapi msvcrt kernel32) +if(MSVC) +target_link_libraries(ftp oldnames) +add_importlibs(ftp ntdll) +endif() add_cab_target(ftp 1) Modified: branches/cmake-bringup/base/applications/network/ping/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/applications…
============================================================================== --- branches/cmake-bringup/base/applications/network/ping/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/base/applications/network/ping/CMakeLists.txt [iso-8859-1] Thu Dec 2 19:44:46 2010 @@ -5,5 +5,8 @@ set_module_type(ping win32cui) add_importlibs(ping ws2_32 msvcrt kernel32) +if(MSVC) +add_importlibs(ping ntdll) +endif() add_cab_target(ping 1) Modified: branches/cmake-bringup/base/applications/network/tracert/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/applications…
============================================================================== --- branches/cmake-bringup/base/applications/network/tracert/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/base/applications/network/tracert/CMakeLists.txt [iso-8859-1] Thu Dec 2 19:44:46 2010 @@ -5,5 +5,8 @@ set_module_type(tracert win32cui) add_importlibs(tracert ws2_32 msvcrt kernel32) +if(MSVC) +add_importlibs(tracert ntdll) +endif() add_cab_target(tracert 1)
14 years, 1 month
1
0
0
0
[tkreuzer] 49901: [CMAKE] Cleanup old comment
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Thu Dec 2 19:18:25 2010 New Revision: 49901 URL:
http://svn.reactos.org/svn/reactos?rev=49901&view=rev
Log: [CMAKE] Cleanup old comment Modified: branches/cmake-bringup/include/dxsdk/CMakeLists.txt Modified: branches/cmake-bringup/include/dxsdk/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/include/dxsdk/CMa…
============================================================================== --- branches/cmake-bringup/include/dxsdk/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/include/dxsdk/CMakeLists.txt [iso-8859-1] Thu Dec 2 19:18:25 2010 @@ -24,6 +24,4 @@ #vmrender.idl ) -# HACK: dxsdk is broken - ADD_INTERFACE_DEFINITIONS(dxsdk ${SOURCE}) - +ADD_INTERFACE_DEFINITIONS(dxsdk ${SOURCE})
14 years, 1 month
1
0
0
0
[tkreuzer] 49900: [CMAKE] - Add importlib for dplayx, ksuser, wined3d - link dplay to dplayx
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Thu Dec 2 19:13:47 2010 New Revision: 49900 URL:
http://svn.reactos.org/svn/reactos?rev=49900&view=rev
Log: [CMAKE] - Add importlib for dplayx, ksuser, wined3d - link dplay to dplayx Modified: branches/cmake-bringup/dll/directx/dplay/CMakeLists.txt branches/cmake-bringup/dll/directx/dplayx/CMakeLists.txt branches/cmake-bringup/dll/directx/ksuser/CMakeLists.txt branches/cmake-bringup/dll/directx/wine/wined3d/CMakeLists.txt Modified: branches/cmake-bringup/dll/directx/dplay/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/directx/dplay…
============================================================================== --- branches/cmake-bringup/dll/directx/dplay/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/dll/directx/dplay/CMakeLists.txt [iso-8859-1] Thu Dec 2 19:13:47 2010 @@ -5,7 +5,10 @@ spec2def(dplay.dll dplay.spec) -add_library(dplay SHARED dplay_main.c version.rc ${CMAKE_CURRENT_BINARY_DIR}/dplay.def) +add_library(dplay SHARED + dplay_main.c + version.rc + ${CMAKE_CURRENT_BINARY_DIR}/dplay.def) set_entrypoint(dplay 0) @@ -19,8 +22,10 @@ ole32 winmm dinput + dplayx ntdll) add_dependencies(dplay psdk buildno_header) -add_cab_target(dplay 1) +add_cab_target(dplay 1) +add_importlib_target(dplay.spec libdplayx) Modified: branches/cmake-bringup/dll/directx/dplayx/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/directx/dplay…
============================================================================== --- branches/cmake-bringup/dll/directx/dplayx/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/dll/directx/dplayx/CMakeLists.txt [iso-8859-1] Thu Dec 2 19:13:47 2010 @@ -14,7 +14,7 @@ name_server.c regsvr.c version.rc - dplayx.def) + ${CMAKE_CURRENT_BINARY_DIR}/dplayx.def) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) @@ -22,7 +22,6 @@ set_module_type(dplayx win32dll) target_link_libraries(dplayx - ${CMAKE_CURRENT_BINARY_DIR}/dplayx.def wine uuid dxguid) @@ -36,4 +35,5 @@ kernel32 ntdll) -add_cab_target(dplayx 1) +add_cab_target(dplayx 1) +add_importlib_target(dplayx.spec) Modified: branches/cmake-bringup/dll/directx/ksuser/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/directx/ksuse…
============================================================================== --- branches/cmake-bringup/dll/directx/ksuser/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/dll/directx/ksuser/CMakeLists.txt [iso-8859-1] Thu Dec 2 19:13:47 2010 @@ -8,3 +8,4 @@ add_importlibs(ksuser advapi32 msvcrt kernel32 ntdll) add_dependencies(ksuser psdk bugcodes) add_cab_target(ksuser 1) +add_importlib_target(ksuser.spec) Modified: branches/cmake-bringup/dll/directx/wine/wined3d/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/directx/wine/…
============================================================================== --- branches/cmake-bringup/dll/directx/wine/wined3d/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/dll/directx/wine/wined3d/CMakeLists.txt [iso-8859-1] Thu Dec 2 19:13:47 2010 @@ -68,4 +68,4 @@ add_dependencies(wined3d wineheaders) add_cab_target(wined3d 1) -add_importlib_target(wined3d.spec) +add_importlib_target(wined3d.spec)
14 years, 1 month
1
0
0
0
[spetreolle] 49899: [CMAKE] Fix shlwapi.
by spetreolle@svn.reactos.org
Author: spetreolle Date: Thu Dec 2 14:57:32 2010 New Revision: 49899 URL:
http://svn.reactos.org/svn/reactos?rev=49899&view=rev
Log: [CMAKE] Fix shlwapi. Modified: branches/cmake-bringup/dll/win32/shlwapi/shlwapi.spec Modified: branches/cmake-bringup/dll/win32/shlwapi/shlwapi.spec URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/shlwapi…
============================================================================== --- branches/cmake-bringup/dll/win32/shlwapi/shlwapi.spec [iso-8859-1] (original) +++ branches/cmake-bringup/dll/win32/shlwapi/shlwapi.spec [iso-8859-1] Thu Dec 2 14:57:32 2010 @@ -417,7 +417,7 @@ 417 stub -noname SHWinHelpOnDemandA 418 stdcall -noname MLFreeLibrary(long) 419 stdcall -noname SHFlushSFCacheWrap() -420 stub @ # CMemStream::Commit +420 stub SHLWAPI_420 # CMemStream::Commit 421 stub -noname SHLoadPersistedDataObject 422 stdcall -noname SHGlobalCounterCreateNamedA(str long) 423 stdcall -noname SHGlobalCounterCreateNamedW(wstr long)
14 years, 1 month
1
0
0
0
[tkreuzer] 49898: [NTOSKRNL] patch by Samuel Serapion: Implement MemorySectionName case for NtQueryVirtualMemory. Protect buffer access with SEH. See issue #5753 for more details.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Thu Dec 2 14:37:16 2010 New Revision: 49898 URL:
http://svn.reactos.org/svn/reactos?rev=49898&view=rev
Log: [NTOSKRNL] patch by Samuel Serapion: Implement MemorySectionName case for NtQueryVirtualMemory. Protect buffer access with SEH. See issue #5753 for more details. Modified: trunk/reactos/ntoskrnl/mm/ARM3/virtual.c Modified: trunk/reactos/ntoskrnl/mm/ARM3/virtual.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/virtual.c…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] Thu Dec 2 14:37:16 2010 @@ -2339,35 +2339,21 @@ NTSTATUS NTAPI -NtQueryVirtualMemory(IN HANDLE ProcessHandle, - IN PVOID BaseAddress, - IN MEMORY_INFORMATION_CLASS MemoryInformationClass, - OUT PVOID MemoryInformation, - IN SIZE_T MemoryInformationLength, - OUT PSIZE_T ReturnLength) +MiQueryMemoryBasicInformation(IN HANDLE ProcessHandle, + IN PVOID BaseAddress, + OUT PVOID MemoryInformation, + IN SIZE_T MemoryInformationLength, + OUT PSIZE_T ReturnLength) { PEPROCESS TargetProcess; - NTSTATUS Status; + NTSTATUS Status = STATUS_SUCCESS; PMMVAD Vad = NULL; PVOID Address, NextAddress; BOOLEAN Found = FALSE; ULONG NewProtect, NewState, BaseVpn; MEMORY_BASIC_INFORMATION MemoryInfo; KAPC_STATE ApcState; - DPRINT("Querying class %d about address: %p\n", MemoryInformationClass, BaseAddress); - - /* Only this class is supported for now */ - ASSERT(MemoryInformationClass == MemoryBasicInformation); - - /* Validate the size information of the class */ - if (MemoryInformationLength < sizeof(MEMORY_BASIC_INFORMATION)) - { - /* The size is invalid */ - return STATUS_INFO_LENGTH_MISMATCH; - } - - /* Bail out if the address is invalid */ - if (BaseAddress > MM_HIGHEST_USER_ADDRESS) return STATUS_INVALID_PARAMETER; + KPROCESSOR_MODE PreviousMode = ExGetPreviousMode(); /* Check for illegal addresses in user-space, or the shared memory area */ if ((BaseAddress > MM_HIGHEST_VAD_ADDRESS) || @@ -2396,11 +2382,27 @@ MemoryInfo.RegionSize = (ULONG_PTR)MemoryInfo.AllocationBase - (ULONG_PTR)Address; } - /* Return the data (FIXME: Use SEH) */ - *(PMEMORY_BASIC_INFORMATION)MemoryInformation = MemoryInfo; - if (ReturnLength) *ReturnLength = sizeof(MEMORY_BASIC_INFORMATION); - - return STATUS_SUCCESS; + /* Return the data, NtQueryInformation already probed it*/ + if (PreviousMode != KernelMode) + { + _SEH2_TRY + { + *(PMEMORY_BASIC_INFORMATION)MemoryInformation = MemoryInfo; + if (ReturnLength) *ReturnLength = sizeof(MEMORY_BASIC_INFORMATION); + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + Status = _SEH2_GetExceptionCode(); + } + _SEH2_END; + } + else + { + *(PMEMORY_BASIC_INFORMATION)MemoryInformation = MemoryInfo; + if (ReturnLength) *ReturnLength = sizeof(MEMORY_BASIC_INFORMATION); + } + + return Status; } /* Check if this is for a local or remote process */ @@ -2507,11 +2509,27 @@ MemoryInfo.Protect = PAGE_NOACCESS; MemoryInfo.Type = 0; - /* Return the data (FIXME: Use SEH) */ - *(PMEMORY_BASIC_INFORMATION)MemoryInformation = MemoryInfo; - if (ReturnLength) *ReturnLength = sizeof(MEMORY_BASIC_INFORMATION); - - return STATUS_SUCCESS; + /* Return the data, NtQueryInformation already probed it*/ + if (PreviousMode != KernelMode) + { + _SEH2_TRY + { + *(PMEMORY_BASIC_INFORMATION)MemoryInformation = MemoryInfo; + if (ReturnLength) *ReturnLength = sizeof(MEMORY_BASIC_INFORMATION); + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + Status = _SEH2_GetExceptionCode(); + } + _SEH2_END; + } + else + { + *(PMEMORY_BASIC_INFORMATION)MemoryInformation = MemoryInfo; + if (ReturnLength) *ReturnLength = sizeof(MEMORY_BASIC_INFORMATION); + } + + return Status; } /* This must be a VM VAD */ @@ -2539,7 +2557,7 @@ Address = NextAddress; } - /* Now that we know the last VA address, calculate hte region size */ + /* Now that we know the last VA address, calculate the region size */ MemoryInfo.RegionSize = ((ULONG_PTR)Address - (ULONG_PTR)MemoryInfo.BaseAddress); /* Check if we were attached */ @@ -2550,17 +2568,179 @@ ObDereferenceObject(TargetProcess); } - /* Return the data (FIXME: Use SEH) */ - *(PMEMORY_BASIC_INFORMATION)MemoryInformation = MemoryInfo; - if (ReturnLength) *ReturnLength = sizeof(MEMORY_BASIC_INFORMATION); - + /* Return the data, NtQueryInformation already probed it*/ + if (PreviousMode != KernelMode) + { + _SEH2_TRY + { + *(PMEMORY_BASIC_INFORMATION)MemoryInformation = MemoryInfo; + if (ReturnLength) *ReturnLength = sizeof(MEMORY_BASIC_INFORMATION); + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + Status = _SEH2_GetExceptionCode(); + } + _SEH2_END; + } + else + { + *(PMEMORY_BASIC_INFORMATION)MemoryInformation = MemoryInfo; + if (ReturnLength) *ReturnLength = sizeof(MEMORY_BASIC_INFORMATION); + } + /* All went well */ DPRINT("Base: %p AllocBase: %p Protect: %lx AllocProtect: %lx " "State: %lx Type: %lx Size: %lx\n", MemoryInfo.BaseAddress, MemoryInfo.AllocationBase, MemoryInfo.AllocationProtect, MemoryInfo.Protect, MemoryInfo.State, MemoryInfo.Type, MemoryInfo.RegionSize); - return STATUS_SUCCESS; + + return Status; } +NTSTATUS +NTAPI +MiQueryMemorySectionName(IN HANDLE ProcessHandle, + IN PVOID BaseAddress, + OUT PVOID MemoryInformation, + IN SIZE_T MemoryInformationLength, + OUT PSIZE_T ReturnLength) +{ + PEPROCESS Process; + NTSTATUS Status; + WCHAR ModuleFileNameBuffer[MAX_PATH] = {0}; + UNICODE_STRING ModuleFileName; + PMEMORY_SECTION_NAME SectionName = NULL; + KPROCESSOR_MODE PreviousMode = ExGetPreviousMode(); + + Status = ObReferenceObjectByHandle(ProcessHandle, + PROCESS_QUERY_INFORMATION, + NULL, + PreviousMode, + (PVOID*)(&Process), + NULL); + + if (!NT_SUCCESS(Status)) + { + DPRINT("MiQueryMemorySectionName: ObReferenceObjectByHandle returned %x\n",Status); + return Status; + } + + RtlInitEmptyUnicodeString(&ModuleFileName, ModuleFileNameBuffer, sizeof(ModuleFileNameBuffer)); + Status = MmGetFileNameForAddress(BaseAddress, &ModuleFileName); + + if (NT_SUCCESS(Status)) + { + SectionName = MemoryInformation; + if (PreviousMode != KernelMode) + { + _SEH2_TRY + { + RtlInitUnicodeString(&SectionName->SectionFileName, SectionName->NameBuffer); + SectionName->SectionFileName.MaximumLength = MemoryInformationLength; + RtlCopyUnicodeString(&SectionName->SectionFileName, &ModuleFileName); + + if (ReturnLength) *ReturnLength = ModuleFileName.Length; + + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + Status = _SEH2_GetExceptionCode(); + } + _SEH2_END; + } + else + { + RtlInitUnicodeString(&SectionName->SectionFileName, SectionName->NameBuffer); + SectionName->SectionFileName.MaximumLength = MemoryInformationLength; + RtlCopyUnicodeString(&SectionName->SectionFileName, &ModuleFileName); + + if (ReturnLength) *ReturnLength = ModuleFileName.Length; + + } + } + ObDereferenceObject(Process); + return Status; +} + +NTSTATUS +NTAPI +NtQueryVirtualMemory(IN HANDLE ProcessHandle, + IN PVOID BaseAddress, + IN MEMORY_INFORMATION_CLASS MemoryInformationClass, + OUT PVOID MemoryInformation, + IN SIZE_T MemoryInformationLength, + OUT PSIZE_T ReturnLength) +{ + NTSTATUS Status = STATUS_SUCCESS; + KPROCESSOR_MODE PreviousMode; + + DPRINT("Querying class %d about address: %p\n", MemoryInformationClass, BaseAddress); + + /* Bail out if the address is invalid */ + if (BaseAddress > MM_HIGHEST_USER_ADDRESS) return STATUS_INVALID_PARAMETER; + + /* Probe return buffer */ + PreviousMode = ExGetPreviousMode(); + if (PreviousMode != KernelMode) + { + _SEH2_TRY + { + ProbeForWrite(MemoryInformation, + MemoryInformationLength, + sizeof(ULONG_PTR)); + + if (ReturnLength) ProbeForWriteSize_t(ReturnLength); + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + Status = _SEH2_GetExceptionCode(); + } + _SEH2_END; + + if (!NT_SUCCESS(Status)) + { + return Status; + } + } + + switch(MemoryInformationClass) + { + case MemoryBasicInformation: + /* Validate the size information of the class */ + if (MemoryInformationLength < sizeof(MEMORY_BASIC_INFORMATION)) + { + /* The size is invalid */ + return STATUS_INFO_LENGTH_MISMATCH; + } + Status = MiQueryMemoryBasicInformation(ProcessHandle, + BaseAddress, + MemoryInformation, + MemoryInformationLength, + ReturnLength); + break; + + case MemorySectionName: + /* Validate the size information of the class */ + if (MemoryInformationLength < sizeof(MEMORY_SECTION_NAME)) + { + /* The size is invalid */ + return STATUS_INFO_LENGTH_MISMATCH; + } + Status = MiQueryMemorySectionName(ProcessHandle, + BaseAddress, + MemoryInformation, + MemoryInformationLength, + ReturnLength); + break; + case MemoryWorkingSetList: + case MemoryBasicVlmInformation: + default: + DPRINT1("Unhandled memory information class %d\n", MemoryInformationClass); + break; + } + + return Status; +} + /* EOF */
14 years, 1 month
1
0
0
0
← Newer
1
...
32
33
34
35
36
37
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
Results per page:
10
25
50
100
200