Author: akhaldi
Date: Sat Oct 8 16:47:57 2011
New Revision: 54055
URL:
http://svn.reactos.org/svn/reactos?rev=54055&view=rev
Log:
[CMAKE]
* Temporarily go back to using the ret^H^H^H previous way of using debug info. Build will,
for example, be slower, take double the disk space it needs right now, but...
* Introduce __ROS_DWARF__ for the meaning __ROS_CMAKE__ implied previously.
Modified:
trunk/reactos/CMakeLists.txt
trunk/reactos/cmake/gcc.cmake
trunk/reactos/include/reactos/rossym.h
trunk/reactos/lib/CMakeLists.txt
trunk/reactos/lib/rossym/CMakeLists.txt
trunk/reactos/ntoskrnl/CMakeLists.txt
trunk/reactos/ntoskrnl/cache/section/io.c
trunk/reactos/ntoskrnl/cache/section/newmm.h
trunk/reactos/ntoskrnl/include/internal/kd.h
trunk/reactos/ntoskrnl/kdbg/kdb_cli.c
trunk/reactos/tools/CMakeLists.txt
trunk/reactos/tools/rsym/CMakeLists.txt
Modified: trunk/reactos/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/CMakeLists.txt?rev=54055&a…
==============================================================================
--- trunk/reactos/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/CMakeLists.txt [iso-8859-1] Sat Oct 8 16:47:57 2011
@@ -61,7 +61,7 @@
add_subdirectory(lib)
if(NOT MSVC)
- export(TARGETS widl wrc gendib cabman cdmake mkhive obj2bin spec2def geninc FILE
${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- )
+ export(TARGETS widl wrc gendib cabman cdmake mkhive obj2bin spec2def geninc rsym
FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- )
else()
export(TARGETS gendib cabman cdmake mkhive obj2bin spec2def geninc FILE
${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- )
endif()
Modified: trunk/reactos/cmake/gcc.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/gcc.cmake?rev=54055&…
==============================================================================
--- trunk/reactos/cmake/gcc.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/gcc.cmake [iso-8859-1] Sat Oct 8 16:47:57 2011
@@ -8,7 +8,8 @@
add_compile_flags("-pipe -fms-extensions")
# Debugging (Note: DWARF-4 on 4.5.1 when we ship)
-add_compile_flags("-gdwarf-2 -g2 -femit-struct-debug-detailed=none
-feliminate-unused-debug-types")
+# add_compile_flags("-gdwarf-2 -g2 -femit-struct-debug-detailed=none
-feliminate-unused-debug-types")
+add_compile_flags("-gstabs+")
# Do not allow warnings
add_compile_flags("-Werror")
@@ -87,17 +88,29 @@
link_directories(${REACTOS_BINARY_DIR}/lib/sdk/crt)
-set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <CMAKE_C_LINK_FLAGS>
<LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
-
-set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_CXX_COMPILER>
<CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET>
<LINK_LIBRARIES>")
+get_target_property(RSYM native-rsym IMPORTED_LOCATION_NOCONFIG)
+
+set(CMAKE_C_LINK_EXECUTABLE
+ "<CMAKE_C_COMPILER> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS>
<OBJECTS> -o <TARGET> <LINK_LIBRARIES>"
+ "${RSYM} <TARGET> <TARGET>")
+
+set(CMAKE_CXX_LINK_EXECUTABLE
+ "<CMAKE_CXX_COMPILER> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS>
<OBJECTS> -o <TARGET> <LINK_LIBRARIES>"
+ "${RSYM} <TARGET> <TARGET>")
set(CMAKE_EXE_LINKER_FLAGS "-nostdlib
-Wl,--enable-auto-image-base,--disable-auto-import,--disable-stdcall-fixup")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS_INIT}
-Wl,--disable-stdcall-fixup")
-set(CMAKE_C_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER>
<CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS>
<CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS>
<LINK_LIBRARIES>")
-set(CMAKE_CXX_CREATE_SHARED_LIBRARY "<CMAKE_CXX_COMPILER>
<CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LINK_FLAGS>
<CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> -o <TARGET> <OBJECTS>
<LINK_LIBRARIES>")
-set(CMAKE_RC_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER>
<CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS>
<CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS>
<LINK_LIBRARIES>")
+set(CMAKE_C_CREATE_SHARED_LIBRARY
+ "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS>
<LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET>
<OBJECTS> <LINK_LIBRARIES>"
+ "${RSYM} <TARGET> <TARGET>")
+set(CMAKE_CXX_CREATE_SHARED_LIBRARY
+ "<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS>
<LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> -o <TARGET>
<OBJECTS> <LINK_LIBRARIES>"
+ "${RSYM} <TARGET> <TARGET>")
+set(CMAKE_RC_CREATE_SHARED_LIBRARY
+ "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS>
<LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET>
<OBJECTS> <LINK_LIBRARIES>"
+ "${RSYM} <TARGET> <TARGET>")
SET(CMAKE_C_COMPILE_OBJECT "${CCACHE} <CMAKE_C_COMPILER> <DEFINES>
<FLAGS> -o <OBJECT> -c <SOURCE>")
SET(CMAKE_CXX_COMPILE_OBJECT "${CCACHE} <CMAKE_CXX_COMPILER> <DEFINES>
<FLAGS> -o <OBJECT> -c <SOURCE>")
Modified: trunk/reactos/include/reactos/rossym.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/rossym.h?r…
==============================================================================
--- trunk/reactos/include/reactos/rossym.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/rossym.h [iso-8859-1] Sat Oct 8 16:47:57 2011
@@ -110,7 +110,7 @@
BOOLEAN (*MemGetProc)(PVOID FileContext, ULONG_PTR *Target, PVOID SourceMem, ULONG
Size);
} ROSSYM_CALLBACKS, *PROSSYM_CALLBACKS;
-#ifdef __ROS_CMAKE__
+#ifdef __ROS_DWARF__
typedef struct _ROSSYM_OWN_FILECONTEXT {
BOOLEAN (*ReadFileProc)(PVOID FileContext, PVOID Buffer, ULONG Size);
BOOLEAN (*SeekFileProc)(PVOID FileContext, ULONG_PTR Position);
@@ -123,7 +123,7 @@
#endif
VOID RosSymInit(PROSSYM_CALLBACKS Callbacks);
-#ifndef __ROS_CMAKE__
+#ifndef __ROS_DWARF__
VOID RosSymInitKernelMode(VOID);
#endif
VOID RosSymInitUserMode(VOID);
@@ -135,7 +135,7 @@
BOOLEAN RosSymCreateFromFile(PVOID FileContext, PROSSYM_INFO *RosSymInfo);
ULONG RosSymGetRawDataLength(PROSSYM_INFO RosSymInfo);
VOID RosSymGetRawData(PROSSYM_INFO RosSymInfo, PVOID RawData);
-#ifdef __ROS_CMAKE__
+#ifdef __ROS_DWARF__
BOOLEAN RosSymGetAddressInformation(PROSSYM_INFO RosSymInfo,
ULONG_PTR RelativeAddress,
PROSSYM_LINEINFO RosSymLineInfo);
Modified: trunk/reactos/lib/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/CMakeLists.txt?rev=540…
==============================================================================
--- trunk/reactos/lib/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/lib/CMakeLists.txt [iso-8859-1] Sat Oct 8 16:47:57 2011
@@ -15,7 +15,7 @@
add_subdirectory(ppcmmu)
add_subdirectory(pseh)
add_subdirectory(recyclebin)
-add_subdirectory(rossym_new)
+add_subdirectory(rossym)
add_subdirectory(rtl)
add_subdirectory(sdk)
add_subdirectory(smlib)
Modified: trunk/reactos/lib/rossym/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rossym/CMakeLists.txt?…
==============================================================================
--- trunk/reactos/lib/rossym/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/lib/rossym/CMakeLists.txt [iso-8859-1] Sat Oct 8 16:47:57 2011
@@ -1,27 +1,19 @@
if(MSVC)
-add_library(rossym dummy.c)
+ add_library(rossym dummy.c)
else()
-add_definitions(-D_NTSYSTEM_)
-list(APPEND SOURCE
- delete.c
- dwarf386.c
- dwarfabbrev.c
- dwarfaranges.c
- dwarfcfa.c
- dwarfinfo.c
- dwarfget.c
- dwarfopen.c
- dwarfpc.c
- dwarfpubnames.c
- find.c
- fromfile.c
- iofile.c
- init.c
- initkm.c
- initum.c
- pe.c
- zwfile.c)
-add_library(rossym ${SOURCE})
-add_dependencies(rossym psdk bugcodes)
+ add_definitions(-D_NTSYSTEM_)
+ list(APPEND SOURCE
+ delete.c
+ find.c
+ fromfile.c
+ frommem.c
+ fromraw.c
+ getraw.c
+ init.c
+ initkm.c
+ initum.c
+ zwfile.c)
+ add_library(rossym ${SOURCE})
+ add_dependencies(rossym psdk bugcodes)
endif()
Modified: trunk/reactos/ntoskrnl/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/CMakeLists.txt?re…
==============================================================================
--- trunk/reactos/ntoskrnl/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/CMakeLists.txt [iso-8859-1] Sat Oct 8 16:47:57 2011
@@ -389,7 +389,8 @@
endif()
if(DBG OR KDBG)
- list(APPEND SOURCE kdbg/kdb_symbols.cmake.c)
+ #list(APPEND SOURCE kdbg/kdb_symbols.cmake.c)
+ list(APPEND SOURCE kdbg/kdb_symbols.c)
endif()
list(APPEND SOURCE
Modified: trunk/reactos/ntoskrnl/cache/section/io.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cache/section/io.…
==============================================================================
--- trunk/reactos/ntoskrnl/cache/section/io.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cache/section/io.c [iso-8859-1] Sat Oct 8 16:47:57 2011
@@ -100,7 +100,7 @@
PLARGE_INTEGER FileOffset,
PVOID Buffer,
ULONG Length,
-#ifdef __ROS_CMAKE__
+#ifdef __ROS_DWARF__
BOOLEAN Paging,
#endif
PIO_STATUS_BLOCK ReadStatus)
@@ -145,7 +145,7 @@
return STATUS_NO_MEMORY;
}
-#ifndef __ROS_CMAKE__
+#ifndef __ROS_DWARF__
Irp->Flags |= IRP_PAGING_IO | IRP_SYNCHRONOUS_PAGING_IO | IRP_NOCACHE |
IRP_SYNCHRONOUS_API;
#else
Irp->Flags |= (Paging ? IRP_PAGING_IO | IRP_SYNCHRONOUS_PAGING_IO | IRP_NOCACHE :
0) | IRP_SYNCHRONOUS_API;
@@ -159,7 +159,7 @@
IrpSp->FileObject = FileObject;
IrpSp->CompletionRoutine = MiSimpleReadComplete;
-#ifdef __ROS_CMAKE__
+#ifdef __ROS_DWARF__
ObReferenceObject(FileObject);
#endif
Modified: trunk/reactos/ntoskrnl/cache/section/newmm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cache/section/new…
==============================================================================
--- trunk/reactos/ntoskrnl/cache/section/newmm.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cache/section/newmm.h [iso-8859-1] Sat Oct 8 16:47:57 2011
@@ -181,7 +181,7 @@
PLARGE_INTEGER FileOffset,
PVOID Buffer,
ULONG Length,
-#ifdef __ROS_CMAKE__
+#ifdef __ROS_DWARF__
BOOLEAN Paging,
#endif
PIO_STATUS_BLOCK ReadStatus);
Modified: trunk/reactos/ntoskrnl/include/internal/kd.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/kd.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/kd.h [iso-8859-1] Sat Oct 8 16:47:57 2011
@@ -83,7 +83,7 @@
KdbSymGetAddressInformation(
IN PROSSYM_INFO RosSymInfo,
IN ULONG_PTR RelativeAddress,
-#ifdef __ROS_CMAKE__
+#ifdef __ROS_DWARF__
IN PROSSYM_LINEINFO RosSymLineInfo
#else
OUT PULONG LineNumber OPTIONAL,
Modified: trunk/reactos/ntoskrnl/kdbg/kdb_cli.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kdbg/kdb_cli.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/kdbg/kdb_cli.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/kdbg/kdb_cli.c [iso-8859-1] Sat Oct 8 16:47:57 2011
@@ -90,7 +90,7 @@
static BOOLEAN KdbpCmdHelp(ULONG Argc, PCHAR Argv[]);
static BOOLEAN KdbpCmdDmesg(ULONG Argc, PCHAR Argv[]);
-#ifdef __ROS_CMAKE__
+#ifdef __ROS_DWARF__
static BOOLEAN KdbpCmdPrintStruct(ULONG Argc, PCHAR Argv[]);
#endif
@@ -139,7 +139,7 @@
{ "sregs", "sregs", "Display status registers.",
KdbpCmdRegs },
{ "dregs", "dregs", "Display debug registers.",
KdbpCmdRegs },
{ "bt", "bt [*frameaddr|thread id]", "Prints current
backtrace or from given frame addr", KdbpCmdBackTrace },
-#ifdef __ROS_CMAKE__
+#ifdef __ROS_DWARF__
{ "dt", "dt [mod] [type] [addr]", "Print a struct. Addr is
optional.", KdbpCmdPrintStruct },
#endif
@@ -460,7 +460,7 @@
return TRUE;
}
-#ifdef __ROS_CMAKE__
+#ifdef __ROS_DWARF__
/*!\brief Print a struct
*/
Modified: trunk/reactos/tools/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/CMakeLists.txt?rev=5…
==============================================================================
--- trunk/reactos/tools/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/tools/CMakeLists.txt [iso-8859-1] Sat Oct 8 16:47:57 2011
@@ -15,6 +15,7 @@
add_subdirectory(unicode)
if(NOT MSVC)
+add_subdirectory(rsym)
add_subdirectory(widl)
add_subdirectory(wpp)
add_subdirectory(wrc)
Modified: trunk/reactos/tools/rsym/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rsym/CMakeLists.txt?…
==============================================================================
--- trunk/reactos/tools/rsym/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/tools/rsym/CMakeLists.txt [iso-8859-1] Sat Oct 8 16:47:57 2011
@@ -1,3 +1,7 @@
-add_executable(rsym rsym_common.c rsym.cmake.c)
+if(ARCH MATCHES i386)
+ add_executable(rsym rsym_common.c rsym.c)
+elseif(ARCH MATCHES amd64)
+ add_executable(rsym rsym_common.c rsym64.c)
+endif()
add_executable(raddr2line rsym_common.c raddr2line.c)