I'm able to generate C::B in 64 bits for Windows with wxwidgets 2.8.12. Until now OK, less problems than with wx30.
But I'm not able to generate exchndl.dll.
I know that there is a special target generation for it in codeblocks*.cbp but there are a few problems.
Some of the targets use library libz, some other use libintl. I have libintl.a in 32 bits versions but "only" a dll in 64 bits (libintl-8). In any case, I have not a libz .a or .dll.
I can compile this dll in 32 bits, but in 64 bits I have compiling errors.
Here is the full log :
-------------- Nettoyer : Release_64 dans exchndl (compilateur : GNU GCC Compiler)---------------
Nettoyés "exchndl - Release_64"
-------------- Générer : Release_64 dans exchndl (compilateur : GNU GCC Compiler)---------------
mingw32-gcc.exe -Wall -DBUILD_DLL -O2 -Iinclude -c C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c -o obj\Release_64\exchndl.o
mingw32-g++.exe -shared -Wl,--output-def=bin\Release_64\libexchndl.def -Wl,--out-implib=bin\Release_64\libexchndl.a -Wl,--dll obj\Release_64\exchndl.o -o bin\Release_64\exchndl.dll -s -lbfd -lintl -liberty -luser32
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c: In function 'GetModuleBase':
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:50:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
return VirtualQuery((LPCVOID) dwAddress, &Buffer, sizeof(Buffer)) ? (DWORD) Buffer.AllocationBase : 0;
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:50:70: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
return VirtualQuery((LPCVOID) dwAddress, &Buffer, sizeof(Buffer)) ? (DWORD) Buffer.AllocationBase : 0;
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c: In function 'BfdGetSymFromAddr':
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:151:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
if(!(hModule = (HMODULE) GetModuleBase(dwAddress)))
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c: In function 'BfdGetLineFromAddr':
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:181:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
if(!(hModule = (HMODULE) GetModuleBase(dwAddress)))
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c: In function 'PEGetSymFromAddr':
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:467:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
if(!(hModule = (HMODULE) GetModuleBase(dwAddress)))
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:481:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
pNtHdr = (PIMAGE_NT_HEADERS)((DWORD)hModule + (DWORD)e_lfanew);
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:481:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
pNtHdr = (PIMAGE_NT_HEADERS)((DWORD)hModule + (DWORD)e_lfanew);
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:487:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
pSection = (PIMAGE_SECTION_HEADER) ((DWORD)pNtHdr + sizeof(DWORD) + sizeof(IMAGE_FILE_HEADER) + NtHdr.FileHeader.SizeOfOptionalHeader);
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:500:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
pExportDir = (PIMAGE_EXPORT_DIRECTORY) Section.VirtualAddress;
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:502:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
pExportDir = (PIMAGE_EXPORT_DIRECTORY) NtHdr.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress;
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:508:44: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
if(!ReadProcessMemory(hProcess, (PVOID)((DWORD)hModule + (DWORD)pExportDir), &ExportDir, sizeof(IMAGE_EXPORT_DIRECTORY), NULL))
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:508:61: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
if(!ReadProcessMemory(hProcess, (PVOID)((DWORD)hModule + (DWORD)pExportDir), &ExportDir, sizeof(IMAGE_EXPORT_DIRECTORY), NULL))
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:508:36: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
if(!ReadProcessMemory(hProcess, (PVOID)((DWORD)hModule + (DWORD)pExportDir), &ExportDir, sizeof(IMAGE_EXPORT_DIRECTORY), NULL))
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:515:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
if(!ReadProcessMemory(hProcess, (PVOID)((DWORD)hModule + (DWORD)ExportDir.AddressOfFunctions), AddressOfFunctions, ExportDir.NumberOfFunctions*sizeof(PDWORD), NULL))
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:515:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
if(!ReadProcessMemory(hProcess, (PVOID)((DWORD)hModule + (DWORD)ExportDir.AddressOfFunctions), AddressOfFunctions, ExportDir.NumberOfFunctions*sizeof(PDWORD), NULL))
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:520:24: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
DWORD pFunction = (DWORD)hModule + (DWORD)AddressOfFunctions[j];
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:520:41: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
DWORD pFunction = (DWORD)hModule + (DWORD)AddressOfFunctions[j];
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:527:47: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
if(!ReadProcessMemory(hProcess, (PVOID)((DWORD)hModule + ExportDir.AddressOfNames + j*sizeof(DWORD)), &dwNearestName, sizeof(dwNearestName), NULL))
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:530:23: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
dwNearestName = (DWORD) hModule + dwNearestName;
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:540:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
if(!ReadProcessMemory(hProcess, (PVOID)dwNearestName, lpSymName, nSize, NULL))
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c: In function 'IntelStackWalk':
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:563:21: warning: assignment from incompatible pointer type [enabled by default]
ReadMemoryRoutine = ReadProcessMemory;
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:570:44: error: 'struct _CONTEXT' has no member named 'Eip'
StackFrame->AddrPC.Offset = ContextRecord->Eip;
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:572:47: error: 'struct _CONTEXT' has no member named 'Esp'
StackFrame->AddrStack.Offset = ContextRecord->Esp;
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:574:47: error: 'struct _CONTEXT' has no member named 'Ebp'
StackFrame->AddrFrame.Offset = ContextRecord->Ebp;
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:577:3: warning: passing argument 2 of 'ReadMemoryRoutine' makes integer from pointer without a cast [enabled by default]
if(!ReadMemoryRoutine(hProcess, (LPCVOID) (StackFrame->AddrFrame.Offset + sizeof(DWORD)), &StackFrame->AddrReturn.Offset, sizeof(DWORD), NULL))
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:577:3: note: expected 'DWORD64' but argument is of type 'const void *'
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:584:3: warning: passing argument 2 of 'ReadMemoryRoutine' makes integer from pointer without a cast [enabled by default]
if(!ReadMemoryRoutine(hProcess, (LPCVOID) StackFrame->AddrFrame.Offset, &StackFrame->AddrFrame.Offset, sizeof(DWORD), NULL))
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:584:3: note: expected 'DWORD64' but argument is of type 'const void *'
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:586:3: warning: passing argument 2 of 'ReadMemoryRoutine' makes integer from pointer without a cast [enabled by default]
if(!ReadMemoryRoutine(hProcess, (LPCVOID) (StackFrame->AddrFrame.Offset + sizeof(DWORD)), &StackFrame->AddrReturn.Offset, sizeof(DWORD), NULL))
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:586:3: note: expected 'DWORD64' but argument is of type 'const void *'
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:590:2: warning: passing argument 2 of 'ReadMemoryRoutine' makes integer from pointer without a cast [enabled by default]
ReadMemoryRoutine(hProcess, (LPCVOID) (StackFrame->AddrFrame.Offset + 2*sizeof(DWORD)), StackFrame->Params, sizeof(StackFrame->Params), NULL);
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:590:2: note: expected 'DWORD64' but argument is of type 'const void *'
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c: In function 'StackBackTrace':
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:619:37: error: 'struct _CONTEXT' has no member named 'Eip'
StackFrame.AddrPC.Offset = pContext->Eip;
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:621:40: error: 'struct _CONTEXT' has no member named 'Esp'
StackFrame.AddrStack.Offset = pContext->Esp;
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:623:40: error: 'struct _CONTEXT' has no member named 'Ebp'
StackFrame.AddrFrame.Offset = pContext->Ebp;
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:651:5: warning: passing argument 7 of 'j_StackWalk' from incompatible pointer type [enabled by default]
)
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:306:13: note: expected 'PFUNCTION_TABLE_ACCESS_ROUTINE64' but argument is of type 'void * (*)(void *, DWORD)'
BOOL WINAPI j_StackWalk(
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:651:5: warning: passing argument 8 of 'j_StackWalk' from incompatible pointer type [enabled by default]
)
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:306:13: note: expected 'PGET_MODULE_BASE_ROUTINE64' but argument is of type 'DWORD (*)(void *, DWORD)'
BOOL WINAPI j_StackWalk(
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:696:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
if((hModule = (HMODULE) GetModuleBase(StackFrame.AddrPC.Offset)) && GetModuleFileName(hModule, szModule, sizeof(szModule)))
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c: In function 'GenerateExceptionReport':
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:982:35: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
rprintf(_T(" at location %08x"), (DWORD) pExceptionRecord->ExceptionAddress);
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:983:40: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
if((hModule = (HMODULE) GetModuleBase((DWORD) pExceptionRecord->ExceptionAddress)) && GetModuleFileName(hModule, szModule, sizeof(szModule)))
^
C:\Users\Gerard_2\Documents\CodeBlocks_SVN\CodeBlocks_src\src\base\exchndl\exchndl.c:983:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
if((hModule = (HMODULE) GetModuleBase((DWORD) pExceptionRecord->ExceptionAddress)) && GetModuleFileName(hModule, szModule, sizeof(szModule)))
^
Le processus s'est terminé avec le code d'état 1 (0 minute(s), 3 seconde(s))
6 erreur(s), 31 avertissement(s) (0 minute(s), 3 seconde(s))
I know that this exchndl is mainly used when C::B crash to create the .rpt file.
Does anybody succeded to create a working exchndl.dll file for C::B 64 bits under windows ?
If, yes, with which complementary dlls ?
gd_on