[prev in list] [next in list] [prev in thread] [next in thread]
List: subversion-cvs
Subject:
From: djh () tigris ! org
Date: 2007-09-30 13:29:22
Message-ID: 200709301329.l8UDTMVU010936 () svn2 ! sjc ! collab ! net
[Download RAW message or body]
Author: djh
Date: Sun Sep 30 06:29:22 2007
New Revision: 26854
Log:
Add support for the x64 platform to the Windows build.
* build/generator/gen_win.py
Added 'x64' platform
* build/generator/neon.vcproj.ezt
* build/generator/serf.vcproj.ezt
* build/generator/svn_config.vcproj.ezt
* build/generator/svn_locale.vcproj.ezt
* build/generator/zlib.vcproj.ezt
Added 'x64' debug and release configurations
* build/generator/vcnet_vcproj.ezt
Fixed platform configuration generation to use [platforms] macro
instead of 'Win32'
* subversion/libsvn_subr/win32_crashrpt_dll.h
* subversion/libsvn_subr/win32_crashrpt.c
Use 5.1+ DbgHelp api to enable the crash handler on non x86 cpu's
Patch by: Bert Huijben <bhuijben@competence.biz>
Modified:
trunk/build/generator/gen_win.py
trunk/build/generator/neon.vcproj.ezt
trunk/build/generator/serf.vcproj.ezt
trunk/build/generator/svn_config.vcproj.ezt
trunk/build/generator/svn_locale.vcproj.ezt
trunk/build/generator/vcnet_vcproj.ezt
trunk/build/generator/zlib.vcproj.ezt
trunk/subversion/libsvn_subr/win32_crashrpt.c
trunk/subversion/libsvn_subr/win32_crashrpt_dll.h
Modified: trunk/build/generator/gen_win.py
URL: http://svn.collab.net/viewvc/svn/trunk/build/generator/gen_win.py?pathrev=26854&r1=26853&r2=26854
==============================================================================
--- trunk/build/generator/gen_win.py (original)
+++ trunk/build/generator/gen_win.py Sun Sep 30 06:29:22 2007
@@ -260,7 +260,7 @@
os.makedirs(self.projfilesdir)
#Here we can add additional platforms to compile for
- self.platforms = ['Win32']
+ self.platforms = ['Win32','x64']
#Here we can add additional modes to compile for
self.configs = ['Debug','Release']
Modified: trunk/build/generator/neon.vcproj.ezt
URL: http://svn.collab.net/viewvc/svn/trunk/build/generator/neon.vcproj.ezt?pathrev=26854&r1=26853&r2=26854
==============================================================================
--- trunk/build/generator/neon.vcproj.ezt (original)
+++ trunk/build/generator/neon.vcproj.ezt Sun Sep 30 06:29:22 2007
@@ -9,6 +9,8 @@
<Platforms>
<Platform
Name="Win32"/>
+ <Platform
+ Name="x64"/>
</Platforms>
<Configurations>
<Configuration
@@ -39,6 +41,34 @@
CleanCommandLine="nmake /nologo /f neon.mak CLEAN EXPAT_INC=[expat_path] [if-any \
zlib_path]ZLIB_SRC=[zlib_path][end] [if-any \
openssl_path]OPENSSL_SRC=[openssl_path][end]" Output="libneon.lib"/>
</Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="0"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCNMakeTool"
+ BuildCommandLine="nmake /nologo /f neon.mak ALL DEBUG_BUILD=Aye \
EXPAT_INC=[expat_path] [if-any zlib_path]ZLIB_SRC=[zlib_path] \
ZLIB_LIBS=[zlib_path]\zlibstatD.lib[end] [if-any \
openssl_path]OPENSSL_SRC=[openssl_path][end]" + ReBuildCommandLine="nmake /nologo \
/f neon.mak CLEAN ALL DEBUG_BUILD=Aye EXPAT_INC=[expat_path] [if-any \
zlib_path]ZLIB_SRC=[zlib_path] ZLIB_LIBS=[zlib_path]\zlibstatD.lib[end] [if-any \
openssl_path]OPENSSL_SRC=[openssl_path][end]" + CleanCommandLine="nmake /nologo /f \
neon.mak CLEAN DEBUG_BUILD=Aye EXPAT_INC=[expat_path] [if-any \
zlib_path]ZLIB_SRC=[zlib_path] ZLIB_LIBS=[zlib_path]\zlibstatD.lib[end] [if-any \
openssl_path]OPENSSL_SRC=[openssl_path][end]" + Output="libneonD.lib"/>
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="0"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCNMakeTool"
+ BuildCommandLine="nmake /nologo /f neon.mak ALL EXPAT_INC=[expat_path] [if-any \
zlib_path]ZLIB_SRC=[zlib_path][end] [if-any \
openssl_path]OPENSSL_SRC=[openssl_path][end]" + ReBuildCommandLine="nmake /nologo \
/f neon.mak CLEAN ALL EXPAT_INC=[expat_path] [if-any \
zlib_path]ZLIB_SRC=[zlib_path][end] [if-any \
openssl_path]OPENSSL_SRC=[openssl_path][end]" + CleanCommandLine="nmake /nologo /f \
neon.mak CLEAN EXPAT_INC=[expat_path] [if-any zlib_path]ZLIB_SRC=[zlib_path][end] \
[if-any openssl_path]OPENSSL_SRC=[openssl_path][end]" + Output="libneon.lib"/>
+ </Configuration>
</Configurations>
<Files>
<Filter
Modified: trunk/build/generator/serf.vcproj.ezt
URL: http://svn.collab.net/viewvc/svn/trunk/build/generator/serf.vcproj.ezt?pathrev=26854&r1=26853&r2=26854
==============================================================================
--- trunk/build/generator/serf.vcproj.ezt (original)
+++ trunk/build/generator/serf.vcproj.ezt Sun Sep 30 06:29:22 2007
@@ -9,6 +9,8 @@
<Platforms>
<Platform
Name="Win32"/>
+ <Platform
+ Name="x64"/>
</Platforms>
<Configurations>
<Configuration
@@ -39,6 +41,34 @@
CleanCommandLine="nmake /s /nologo /f serf.mak CLEAN \
APR_SRC=[apr_path] APRUTIL_SRC=[apr_util_path] [if-any \
zlib_path]ZLIB_SRC=[zlib_path][end] [if-any \
openssl_path]OPENSSL_SRC=[openssl_path][end]" Output="$(OutDir)\serf.lib"/>
</Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="0"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCNMakeTool"
+ BuildCommandLine="nmake /s /nologo /f serf.mak ALL DEBUG_BUILD=1 \
APR_SRC=[apr_path] APRUTIL_SRC=[apr_util_path] [if-any \
zlib_path]ZLIB_SRC=[zlib_path][end] [if-any \
openssl_path]OPENSSL_SRC=[openssl_path][end]" + \
ReBuildCommandLine="nmake /s /nologo /f serf.mak CLEAN ALL DEBUG_BUILD=1 \
APR_SRC=[apr_path] APRUTIL_SRC=[apr_util_path] [if-any \
zlib_path]ZLIB_SRC=[zlib_path][end] [if-any \
openssl_path]OPENSSL_SRC=[openssl_path][end]" + \
CleanCommandLine="nmake /s /nologo /f serf.mak CLEAN DEBUG_BUILD=1 APR_SRC=[apr_path] \
APRUTIL_SRC=[apr_util_path] [if-any zlib_path]ZLIB_SRC=[zlib_path][end] [if-any \
openssl_path]OPENSSL_SRC=[openssl_path][end]" + \
Output="$(OutDir)\serf.lib"/> + </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="0"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCNMakeTool"
+ BuildCommandLine="nmake /s /nologo /f serf.mak ALL \
APR_SRC=[apr_path] APRUTIL_SRC=[apr_util_path] [if-any \
zlib_path]ZLIB_SRC=[zlib_path][end] [if-any \
openssl_path]OPENSSL_SRC=[openssl_path][end]" + \
ReBuildCommandLine="nmake /s /nologo /f serf.mak CLEAN ALL APR_SRC=[apr_path] \
APRUTIL_SRC=[apr_util_path] [if-any zlib_path]ZLIB_SRC=[zlib_path][end] [if-any \
openssl_path]OPENSSL_SRC=[openssl_path][end]" + \
CleanCommandLine="nmake /s /nologo /f serf.mak CLEAN APR_SRC=[apr_path] \
APRUTIL_SRC=[apr_util_path] [if-any zlib_path]ZLIB_SRC=[zlib_path][end] [if-any \
openssl_path]OPENSSL_SRC=[openssl_path][end]" + \
Output="$(OutDir)\serf.lib"/> + </Configuration>
</Configurations>
<Files>
<Filter
Modified: trunk/build/generator/svn_config.vcproj.ezt
URL: http://svn.collab.net/viewvc/svn/trunk/build/generator/svn_config.vcproj.ezt?pathrev=26854&r1=26853&r2=26854
==============================================================================
--- trunk/build/generator/svn_config.vcproj.ezt (original)
+++ trunk/build/generator/svn_config.vcproj.ezt Sun Sep 30 06:29:22 2007
@@ -9,6 +9,8 @@
<Platforms>
<Platform
Name="Win32"/>
+ <Platform
+ Name="x64"/>
</Platforms>
<Configurations>
<Configuration
@@ -49,6 +51,44 @@
<Tool
Name="VCPreBuildEventTool"/>
</Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="."
+ IntermediateDirectory="."
+ ConfigurationType="10"
+ UseOfMFC="0"
+ DeleteExtensionsOnClean="*.obj;*.ilk;*.pdb;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;$(TargetPath)"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="./svn_config.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="."
+ IntermediateDirectory="."
+ ConfigurationType="10"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ DeleteExtensionsOnClean="*.obj;*.ilk;*.pdb;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;$(TargetPath)">
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="./svn_config.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ </Configuration>
</Configurations>
<Files>
<File
@@ -65,6 +105,18 @@
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ ExcludedFromBuild="TRUE">
+ <Tool
+ Name="VCCustomBuildTool"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ ExcludedFromBuild="TRUE">
+ <Tool
+ Name="VCCustomBuildTool"/>
+ </FileConfiguration>
</File>
<File
RelativePath="..\..\subversion\svn_private_config.hw">
@@ -86,6 +138,24 @@
"
Outputs="..\..\subversion\svn_private_config.h"/>
</FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64">
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Creating svn_private_config.h from svn_private_config.hw."
+ CommandLine="copy ..\..\subversion\svn_private_config.hw \
..\..\subversion\svn_private_config.h > nul +"
+ Outputs="..\..\subversion\svn_private_config.h"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64">
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Creating svn_private_config.h from svn_private_config.hw."
+ CommandLine="copy ..\..\subversion\svn_private_config.hw \
..\..\subversion\svn_private_config.h > nul +"
+ Outputs="..\..\subversion\svn_private_config.h"/>
+ </FileConfiguration>
</File>
</Files>
<Globals>
Modified: trunk/build/generator/svn_locale.vcproj.ezt
URL: http://svn.collab.net/viewvc/svn/trunk/build/generator/svn_locale.vcproj.ezt?pathrev=26854&r1=26853&r2=26854
==============================================================================
--- trunk/build/generator/svn_locale.vcproj.ezt (original)
+++ trunk/build/generator/svn_locale.vcproj.ezt Sun Sep 30 06:29:22 2007
@@ -9,6 +9,8 @@
<Platforms>
<Platform
Name="Win32"/>
+ <Platform
+ Name="x64"/>
</Platforms>
<Configurations>
<Configuration
@@ -33,6 +35,28 @@
ReBuildCommandLine="cmd /c build_locale.bat Release"
/>
</Configuration>
+ <Configuration
+ Name="Debug|x64"
+ ConfigurationType="0"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCNMakeTool"
+ BuildCommandLine="cmd /c build_locale.bat Debug"
+ ReBuildCommandLine="cmd /c build_locale.bat Debug"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ ConfigurationType="0"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCNMakeTool"
+ BuildCommandLine="cmd /c build_locale.bat Release"
+ ReBuildCommandLine="cmd /c build_locale.bat Release"
+ />
+ </Configuration>
</Configurations>
<Files>
</Files>
Modified: trunk/build/generator/vcnet_vcproj.ezt
URL: http://svn.collab.net/viewvc/svn/trunk/build/generator/vcnet_vcproj.ezt?pathrev=26854&r1=26853&r2=26854
==============================================================================
--- trunk/build/generator/vcnet_vcproj.ezt (original)
+++ trunk/build/generator/vcnet_vcproj.ezt Sun Sep 30 06:29:22 2007
@@ -25,7 +25,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="TRUE"
[end] AdditionalIncludeDirectories="[for includes][includes][if-index includes \
last][else];[end][end]"
- PreprocessorDefinitions="[if-any \
instrument_apr_pools]APR_POOL_DEBUG=[instrument_apr_pools];[end][for \
configs.defines][configs.defines][if-index configs.defines last][else];[end][end]" \
+ PreprocessorDefinitions="[if-any \
instrument_apr_pools]APR_POOL_DEBUG=[instrument_apr_pools];[end][for \
configs.defines][configs.defines][if-index configs.defines \
last][else];[end][end];_CRT_SECURE_NO_WARNINGS" [is configs.name \
"Debug"] MinimalRebuild="TRUE" RuntimeLibrary="3"
BufferSecurityCheck="TRUE"
@@ -50,7 +50,7 @@
[end][is configs.name "Debug"] LinkIncremental="2"
[else] LinkIncremental="1"
[end] AdditionalLibraryDirectories="..\..\..\db4-win32\lib;[for \
configs.libdirs][configs.libdirs];[end]"
- TargetMachine="1"
+ TargetMachine="[is platforms "Win32"]1[end][is platforms "x64"]17[end]"
IgnoreDefaultLibraryNames="libc.lib"
[if-any def_file] ModuleDefinitionFile="[def_file]"
[end] GenerateDebugInformation="TRUE"
@@ -63,6 +63,7 @@
[is target_type "4"]
<Tool
Name="VCLibrarianTool"
+ AdditionalOptions="[is platforms "win32"]/MACHINE:X86[end][is platforms \
"x64"]/MACHINE:X64[end]" OutputFile="$(OutDir)\[target.output_name]"/>
[end] <Tool
Name="VCMIDLTool"/>
@@ -82,36 +83,36 @@
[end][end] </Configurations>
<Files>[if-any target.desc]
<File
- RelativePath="..\svn.rc">[for configs]
+ RelativePath="..\svn.rc">[for platforms][for configs]
<FileConfiguration
- Name="[configs.name]|Win32">
+ Name="[configs.name]|[platforms]">
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="[for includes][includes][if-index includes \
last][else];[end][end]"
PreprocessorDefinitions="SVN_FILE_NAME=[target.output_name];SVN_FILE_DESCRIPTION=[target.desc];[is \
configs.name "Debug"]_DEBUG[else]NDEBUG[end]"/>
- </FileConfiguration>[end]
+ </FileConfiguration>[end][end]
</File>[end]
[for sources] <File
RelativePath="[sources.path]">
-[if-any sources.custom_build][for configs]
+[if-any sources.custom_build][for platforms][for configs]
<FileConfiguration
- Name="[configs.name]|Win32">
+ Name="[configs.name]|[platforms]">
<Tool
Name="VCCustomBuildTool"
CommandLine="[sources.custom_build]"
AdditionalDependencies="[for \
sources.user_deps]"[sources.user_deps]";[end]" \
Outputs=""[sources.custom_target]""/> </FileConfiguration>
-[end][end]
-[if-any sources.reldir][for configs]
+[end][end][end]
+[if-any sources.reldir][for platforms][for configs]
<FileConfiguration
- Name="[configs.name]|Win32">
+ Name="[configs.name]|[platforms]">
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)/[sources.reldir]/"
ProgramDataBaseFileName="$(IntDir)/[sources.reldir]/"/>
</FileConfiguration>
-[end][end]
+[end][end][end]
</File>
[end]
[is target_type "2"] <File RelativePath="..\empty.c"/>[end]
Modified: trunk/build/generator/zlib.vcproj.ezt
URL: http://svn.collab.net/viewvc/svn/trunk/build/generator/zlib.vcproj.ezt?pathrev=26854&r1=26853&r2=26854
==============================================================================
--- trunk/build/generator/zlib.vcproj.ezt (original)
+++ trunk/build/generator/zlib.vcproj.ezt Sun Sep 30 06:29:22 2007
@@ -9,6 +9,8 @@
<Platforms>
<Platform
Name="Win32"/>
+ <Platform
+ Name="x64"/>
</Platforms>
<Configurations>
<Configuration
@@ -39,6 +41,34 @@
CleanCommandLine="cmd /c build_zlib.bat release clean"
Output="[zlib_path]\zlibstat.lib"/>
</Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="[zlib_path]\Debug"
+ IntermediateDirectory="[zlib_path]\Debug"
+ ConfigurationType="0"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCNMakeTool"
+ BuildCommandLine="cmd /c build_zlib.bat debug"
+ ReBuildCommandLine="cmd /c build_zlib.bat debug rebuild"
+ CleanCommandLine="cmd /c build_zlib.bat debug clean"
+ Output="[zlib_path]\zlibstatD.lib"/>
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="[zlib_path]\Release"
+ IntermediateDirectory="[zlib_path]\Release"
+ ConfigurationType="0"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE">
+ <Tool
+ Name="VCNMakeTool"
+ BuildCommandLine="cmd /c build_zlib.bat release"
+ ReBuildCommandLine="cmd /c build_zlib.bat release rebuild"
+ CleanCommandLine="cmd /c build_zlib.bat release clean"
+ Output="[zlib_path]\zlibstat.lib"/>
+ </Configuration>
</Configurations>
<Files>
<Filter
Modified: trunk/subversion/libsvn_subr/win32_crashrpt.c
URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_subr/win32_crashrpt.c?pathrev=26854&r1=26853&r2=26854
==============================================================================
--- trunk/subversion/libsvn_subr/win32_crashrpt.c (original)
+++ trunk/subversion/libsvn_subr/win32_crashrpt.c Sun Sep 30 06:29:22 2007
@@ -204,6 +204,7 @@
/* write the register info. */
fprintf(log_file,
"Registers:\n");
+#if defined(_M_IX86)
fprintf(log_file,
"eax=%08x ebx=%08x ecx=%08x edx=%08x esi=%08x edi=%08x\n",
context->Eax, context->Ebx, context->Ecx,
@@ -213,9 +214,30 @@
context->Eip, context->Esp,
context->Ebp, context->EFlags);
fprintf(log_file,
- "cd=%04x ss=%04x ds=%04x es=%04x fs=%04x gs=%04x\n",
+ "cs=%04x ss=%04x ds=%04x es=%04x fs=%04x gs=%04x\n",
context->SegCs, context->SegSs, context->SegDs,
context->SegEs, context->SegFs, context->SegGs);
+#elif defined(_M_X64)
+ fprintf(log_file,
+ "Rax=%016I64x Rcx=%016I64x Rdx=%016I64x Rbx=%016I64x\n",
+ context->Rax, context->Rcx, context->Rdx, context->Rbx);
+ fprintf(log_file,
+ "Rsp=%016I64x Rbp=%016I64x Rsi=%016I64x Rdi=%016I64x\n",
+ context->Rsp, context->Rbp, context->Rsi, context->Rdi);
+ fprintf(log_file,
+ "R8= %016I64x R9= %016I64x R10= %016I64x R11=%016I64x\n",
+ context->R8, context->R9, context->R10, context->R11);
+ fprintf(log_file,
+ "R12=%016I64x R13=%016I64x R14=%016I64x R15=%016I64x\n",
+ context->R12, context->R13, context->R14, context->R15);
+
+ fprintf(log_file,
+ "cs=%04x ss=%04x ds=%04x es=%04x fs=%04x gs=%04x ss=%04x\n",
+ context->SegCs, context->SegDs, context->SegEs,
+ context->SegFs, context->SegGs, context->SegSs);
+#else
+#error Unknown processortype, please disable SVN_USE_WIN32_CRASHHANDLER
+#endif
}
/* formats the value at address based on the specified basic type
@@ -345,7 +367,7 @@
/* Internal structure used to pass some data to the enumerate symbols
* callback */
typedef struct {
- STACKFRAME *stack_frame;
+ STACKFRAME64 *stack_frame;
FILE *log_file;
int nr_of_frame;
BOOL log_params;
@@ -357,7 +379,7 @@
{
static int last_nr_of_frame = 0;
DWORD_PTR var_data = 0; /* Will point to the variable's data in memory */
- STACKFRAME *stack_frame = ((symbols_baton_t*)baton)->stack_frame;
+ STACKFRAME64 *stack_frame = ((symbols_baton_t*)baton)->stack_frame;
FILE *log_file = ((symbols_baton_t*)baton)->log_file;
int nr_of_frame = ((symbols_baton_t*)baton)->nr_of_frame;
BOOL log_params = ((symbols_baton_t*)baton)->log_params;
@@ -366,7 +388,7 @@
/* get the variable's data */
if (sym_info->Flags & SYMFLAG_REGREL)
{
- var_data = stack_frame->AddrFrame.Offset;
+ var_data = (DWORD_PTR)stack_frame->AddrFrame.Offset;
var_data += (DWORD_PTR)sym_info->Address;
}
else
@@ -395,7 +417,7 @@
/* write the details of one function to the log file */
static void
-write_function_detail(STACKFRAME stack_frame, void *data)
+write_function_detail(STACKFRAME64 stack_frame, void *data)
{
ULONG64 symbolBuffer[(sizeof(SYMBOL_INFO) +
MAX_PATH +
@@ -405,7 +427,7 @@
DWORD64 func_disp=0;
IMAGEHLP_STACK_FRAME ih_stack_frame;
- IMAGEHLP_LINE ih_line;
+ IMAGEHLP_LINE64 ih_line;
DWORD line_disp=0;
HANDLE proc = GetCurrentProcess();
@@ -449,7 +471,7 @@
/* find the source line for this function. */
ih_line.SizeOfStruct = sizeof(IMAGEHLP_LINE);
- if (SymGetLineFromAddr_(proc, stack_frame.AddrPC.Offset,
+ if (SymGetLineFromAddr64_(proc, stack_frame.AddrPC.Offset,
&line_disp, &ih_line) != 0)
{
fprintf(log_file,
@@ -469,8 +491,9 @@
static void
write_stacktrace(CONTEXT *context, FILE *log_file)
{
+#if defined (_M_IX86) || defined(_M_X64) || defined(_M_IA64)
HANDLE proc = GetCurrentProcess();
- STACKFRAME stack_frame;
+ STACKFRAME64 stack_frame;
DWORD machine;
CONTEXT ctx;
int skip = 0, i = 0;
@@ -490,25 +513,36 @@
return;
/* Write the stack trace */
- ZeroMemory(&stack_frame, sizeof(STACKFRAME));
+ ZeroMemory(&stack_frame, sizeof(STACKFRAME64));
stack_frame.AddrPC.Mode = AddrModeFlat;
stack_frame.AddrStack.Mode = AddrModeFlat;
stack_frame.AddrFrame.Mode = AddrModeFlat;
-#if defined (_M_IX86)
+
+#if defined(_M_IX86)
machine = IMAGE_FILE_MACHINE_I386;
stack_frame.AddrPC.Offset = context->Eip;
stack_frame.AddrStack.Offset = context->Esp;
stack_frame.AddrFrame.Offset = context->Ebp;
+#elif defined(_M_X64)
+ machine = IMAGE_FILE_MACHINE_AMD64;
+ stack_frame.AddrPC.Offset = context->Rip;
+ stack_frame.AddrStack.Offset = context->Rsp;
+ stack_frame.AddrFrame.Offset = context->Rbp;
+#elif defined(_M_IA64)
+ machine = IMAGE_FILE_MACHINE_IA64;
+ stack_frame.AddrPC.Offset = context->StIIP;
+ stack_frame.AddrStack.Offset = context->SP;
+ stack_frame.AddrBStore.Mode = AddrModeFlat;
+ stack_frame.AddrBStore.Offset = context->RsBSP;
#else
-#error This crash handler only works on Win32, undefine\
- SVN_USE_WIN32_CRASHHANDLER to remove it from the build.
+#error Unknown processortype, please disable SVN_USE_WIN32_CRASHHANDLER
#endif
while (1)
{
- if (! StackWalk_(machine, proc, GetCurrentThread(),
- &stack_frame, context, NULL, SymFunctionTableAccess_,
- SymGetModuleBase_, NULL))
+ if (! StackWalk64_(machine, proc, GetCurrentThread(),
+ &stack_frame, context, NULL,
+ SymFunctionTableAccess64_, SymGetModuleBase64_, NULL))
{
break;
}
@@ -525,6 +559,9 @@
}
i++;
}
+#else
+#error Unknown processortype, please disable SVN_USE_WIN32_CRASHHANDLER
+#endif
}
/* Check if a debugger is attached to this process */
@@ -623,26 +660,27 @@
(SYMCLEANUP)GetProcAddress(dbghelp_dll, "SymCleanup");
SymGetTypeInfo_ =
(SYMGETTYPEINFO)GetProcAddress(dbghelp_dll, "SymGetTypeInfo");
- SymGetLineFromAddr_ =
- (SYMGETLINEFROMADDR)GetProcAddress(dbghelp_dll,
- "SymGetLineFromAddr");
+ SymGetLineFromAddr64_ =
+ (SYMGETLINEFROMADDR64)GetProcAddress(dbghelp_dll,
+ "SymGetLineFromAddr64");
SymEnumSymbols_ =
(SYMENUMSYMBOLS)GetProcAddress(dbghelp_dll, "SymEnumSymbols");
SymSetContext_ =
(SYMSETCONTEXT)GetProcAddress(dbghelp_dll, "SymSetContext");
SymFromAddr_ = (SYMFROMADDR)GetProcAddress(dbghelp_dll, "SymFromAddr");
- StackWalk_ = (STACKWALK)GetProcAddress(dbghelp_dll, "StackWalk");
- SymFunctionTableAccess_ =
- (SYMFUNCTIONTABLEACCESS)GetProcAddress(dbghelp_dll,
- "SymFunctionTableAccess");
- SymGetModuleBase_ =
- (SYMGETMODULEBASE)GetProcAddress(dbghelp_dll, "SymGetModuleBase");
+ StackWalk64_ = (STACKWALK64)GetProcAddress(dbghelp_dll, "StackWalk64");
+ SymFunctionTableAccess64_ =
+ (SYMFUNCTIONTABLEACCESS64)GetProcAddress(dbghelp_dll,
+ "SymFunctionTableAccess64");
+ SymGetModuleBase64_ =
+ (SYMGETMODULEBASE64)GetProcAddress(dbghelp_dll, "SymGetModuleBase64");
if (! (MiniDumpWriteDump_ &&
SymInitialize_ && SymSetOptions_ && SymGetOptions_ &&
- SymCleanup_ && SymGetTypeInfo_ && SymGetLineFromAddr_ &&
- SymEnumSymbols_ && SymSetContext_ && SymFromAddr_ && StackWalk_ &&
- SymFunctionTableAccess_ && SymGetModuleBase_) )
+ SymCleanup_ && SymGetTypeInfo_ && SymGetLineFromAddr64_ &&
+ SymEnumSymbols_ && SymSetContext_ && SymFromAddr_ &&
+ SymGetModuleBase64_ && StackWalk64_ &&
+ SymFunctionTableAccess64_))
goto cleanup;
/* initialize the symbol loading code */
Modified: trunk/subversion/libsvn_subr/win32_crashrpt_dll.h
URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_subr/win32_crashrpt_dll.h?pathrev=26854&r1=26853&r2=26854
==============================================================================
--- trunk/subversion/libsvn_subr/win32_crashrpt_dll.h (original)
+++ trunk/subversion/libsvn_subr/win32_crashrpt_dll.h Sun Sep 30 06:29:22 2007
@@ -40,8 +40,8 @@
ULONG TypeId, IMAGEHLP_SYMBOL_TYPE_INFO \
GetType, PVOID pInfo);
-typedef BOOL (WINAPI * SYMGETLINEFROMADDR)(HANDLE hProcess, DWORD dwAddr,
- PDWORD pdwDisplacement, PIMAGEHLP_LINE Line);
+typedef BOOL (WINAPI * SYMGETLINEFROMADDR64)(HANDLE hProcess, DWORD64 dwAddr,
+ PDWORD pdwDisplacement, PIMAGEHLP_LINE64 Line);
typedef BOOL (WINAPI * SYMENUMSYMBOLS)(HANDLE hProcess, ULONG64 BaseOfDll, PCSTR \
Mask,
PSYM_ENUMERATESYMBOLS_CALLBACK EnumSymbolsCallback,
@@ -53,17 +53,16 @@
typedef BOOL (WINAPI * SYMFROMADDR)(HANDLE hProcess, DWORD64 Address,
PDWORD64 Displacement, PSYMBOL_INFO Symbol);
-typedef BOOL (WINAPI * STACKWALK)(DWORD MachineType, HANDLE hProcess,
- HANDLE hThread, LPSTACKFRAME StackFrame,
- PVOID ContextRecord,
- PREAD_PROCESS_MEMORY_ROUTINE ReadMemoryRoutine,
- PFUNCTION_TABLE_ACCESS_ROUTINE \
FunctionTableAccessRoutine,
- PGET_MODULE_BASE_ROUTINE GetModuleBaseRoutine,
- PTRANSLATE_ADDRESS_ROUTINE TranslateAddress);
+typedef BOOL (WINAPI * STACKWALK64)(DWORD MachineType, HANDLE hProcess, HANDLE \
hThread, + LPSTACKFRAME64 StackFrame, PVOID \
ContextRecord, + PREAD_PROCESS_MEMORY_ROUTINE64 \
ReadMemoryRoutine, + PFUNCTION_TABLE_ACCESS_ROUTINE64 \
FunctionTableAccessRoutine, + \
PGET_MODULE_BASE_ROUTINE64 GetModuleBaseRoutine, + \
PTRANSLATE_ADDRESS_ROUTINE64 TranslateAddress);
-typedef PVOID (WINAPI * SYMFUNCTIONTABLEACCESS)(HANDLE hProcess, DWORD AddrBase);
+typedef PVOID (WINAPI * SYMFUNCTIONTABLEACCESS64)(HANDLE hProcess, DWORD64 \
AddrBase);
-typedef DWORD (WINAPI * SYMGETMODULEBASE)(HANDLE hProcess, DWORD dwAddr);
+typedef DWORD64 (WINAPI * SYMGETMODULEBASE64)(HANDLE hProcess, DWORD64 dwAddr);
/* public functions in version.dll */
typedef DWORD (APIENTRY * GETFILEVERSIONINFOSIZE)
@@ -79,19 +78,19 @@
typedef BOOL (WINAPI * ISDEBUGGERPRESENT)(VOID);
/* function pointers */
-MINIDUMPWRITEDUMP MiniDumpWriteDump_;
-SYMINITIALIZE SymInitialize_;
-SYMSETOPTIONS SymSetOptions_;
-SYMGETOPTIONS SymGetOptions_;
-SYMCLEANUP SymCleanup_;
-SYMGETTYPEINFO SymGetTypeInfo_;
-SYMGETLINEFROMADDR SymGetLineFromAddr_;
-SYMENUMSYMBOLS SymEnumSymbols_;
-SYMSETCONTEXT SymSetContext_;
-SYMFROMADDR SymFromAddr_;
-STACKWALK StackWalk_;
-SYMFUNCTIONTABLEACCESS SymFunctionTableAccess_;
-SYMGETMODULEBASE SymGetModuleBase_;
+MINIDUMPWRITEDUMP MiniDumpWriteDump_;
+SYMINITIALIZE SymInitialize_;
+SYMSETOPTIONS SymSetOptions_;
+SYMGETOPTIONS SymGetOptions_;
+SYMCLEANUP SymCleanup_;
+SYMGETTYPEINFO SymGetTypeInfo_;
+SYMGETLINEFROMADDR64 SymGetLineFromAddr64_;
+SYMENUMSYMBOLS SymEnumSymbols_;
+SYMSETCONTEXT SymSetContext_;
+SYMFROMADDR SymFromAddr_;
+STACKWALK64 StackWalk64_;
+SYMFUNCTIONTABLEACCESS64 SymFunctionTableAccess64_;
+SYMGETMODULEBASE64 SymGetModuleBase64_;
#endif /* SVN_USE_WIN32_CRASHHANDLER */
#endif /* WIN32 */
---------------------------------------------------------------------
To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
For additional commands, e-mail: svn-help@subversion.tigris.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic