C:\codeblocks\trunk\src\plugins\debuggergdb\/gdb_commands.h:1032:67: error: invalid conversion from 'size_t* {aka unsigned int*}' to 'long unsigned int*' [-fpermissive]
C:\wxWidgets-2.8.12\include/wx/string.h:1188:10: error: initializing argument 1 of 'bool wxString::ToULong(long unsigned int*, int) const' [-fpermissive]
C:\codeblocks\trunk\src\plugins\debuggergdb\/gdb_commands.h:1033:72: error: invalid conversion from 'size_t* {aka unsigned int*}' to 'long unsigned int*' [-fpermissive]
C:\wxWidgets-2.8.12\include/wx/string.h:1188:10: error: initializing argument 1 of 'bool wxString::ToULong(long unsigned int*, int) const' [-fpermissive]
C:\codeblocks\trunk\src\plugins\debuggergdb\/gdb_commands.h:1045:67: error: invalid conversion from 'size_t* {aka unsigned int*}' to 'long unsigned int*' [-fpermissive]
C:\wxWidgets-2.8.12\include/wx/string.h:1188:10: error: initializing argument 1 of 'bool wxString::ToULong(long unsigned int*, int) const' [-fpermissive]
C:\codeblocks\trunk\src\plugins\debuggergdb\/gdb_commands.h:1046:72: error: invalid conversion from 'size_t* {aka unsigned int*}' to 'long unsigned int*' [-fpermissive]
C:\wxWidgets-2.8.12\include/wx/string.h:1188:10: error: initializing argument 1 of 'bool wxString::ToULong(long unsigned int*, int) const' [-fpermissive]
C:\codeblocks\trunk\src\plugins\debuggergdb\/gdb_commands.h:1056:67: error: invalid conversion from 'size_t* {aka unsigned int*}' to 'long unsigned int*' [-fpermissive]
C:\wxWidgets-2.8.12\include/wx/string.h:1188:10: error: initializing argument 1 of 'bool wxString::ToULong(long unsigned int*, int) const' [-fpermissive]
Process terminated with status 1 (4 minutes, 24 seconds)
10 errors, 36 warnings (4 minutes, 24 seconds)
I've updated to rev. 7830 and I'm having issues compiling using 32-bit mingw:I got this also (win7 64-bit, but 32-bit compiler).CodeC:\codeblocks\trunk\src\plugins\debuggergdb\/gdb_commands.h:1032:67: error: invalid conversion from 'size_t* {aka unsigned int*}' to 'long unsigned int*' [-fpermissive]
C:\wxWidgets-2.8.12\include/wx/string.h:1188:10: error: initializing argument 1 of 'bool wxString::ToULong(long unsigned int*, int) const' [-fpermissive]
C:\codeblocks\trunk\src\plugins\debuggergdb\/gdb_commands.h:1033:72: error: invalid conversion from 'size_t* {aka unsigned int*}' to 'long unsigned int*' [-fpermissive]
C:\wxWidgets-2.8.12\include/wx/string.h:1188:10: error: initializing argument 1 of 'bool wxString::ToULong(long unsigned int*, int) const' [-fpermissive]
C:\codeblocks\trunk\src\plugins\debuggergdb\/gdb_commands.h:1045:67: error: invalid conversion from 'size_t* {aka unsigned int*}' to 'long unsigned int*' [-fpermissive]
C:\wxWidgets-2.8.12\include/wx/string.h:1188:10: error: initializing argument 1 of 'bool wxString::ToULong(long unsigned int*, int) const' [-fpermissive]
C:\codeblocks\trunk\src\plugins\debuggergdb\/gdb_commands.h:1046:72: error: invalid conversion from 'size_t* {aka unsigned int*}' to 'long unsigned int*' [-fpermissive]
C:\wxWidgets-2.8.12\include/wx/string.h:1188:10: error: initializing argument 1 of 'bool wxString::ToULong(long unsigned int*, int) const' [-fpermissive]
C:\codeblocks\trunk\src\plugins\debuggergdb\/gdb_commands.h:1056:67: error: invalid conversion from 'size_t* {aka unsigned int*}' to 'long unsigned int*' [-fpermissive]
C:\wxWidgets-2.8.12\include/wx/string.h:1188:10: error: initializing argument 1 of 'bool wxString::ToULong(long unsigned int*, int) const' [-fpermissive]
Process terminated with status 1 (4 minutes, 24 seconds)
10 errors, 36 warnings (4 minutes, 24 seconds)
I'm guessing a type issue with the 64-bit modifications?
I've updated to rev. 7830 and I'm having issues compiling using 32-bit mingw:What compiler are you using?
Index: src/plugins/debuggergdb/debugger_defs.h
===================================================================
--- src/plugins/debuggergdb/debugger_defs.h (revision 7830)
+++ src/plugins/debuggergdb/debugger_defs.h (working copy)
@@ -222,9 +222,13 @@
}
bool valid; ///< Is this stack frame valid?
// 64 bit compatibility: don't use unsigned long int here:
+#if defined(_WIN64)
size_t number; ///< Stack frame's number (used in backtraces).
- // ...and here:
size_t address; ///< Stack frame's address.
+#else
+ unsigned long int number; ///< Stack frame's number (used in backtraces).
+ unsigned long int address; ///< Stack frame's address.
+#endif
wxString function; ///< Current function name.
wxString file; ///< Current file.
wxString line; ///< Current line in file.
...could you try this patch, please:CodeIndex: src/plugins/debuggergdb/debugger_defs.h
===================================================================
--- src/plugins/debuggergdb/debugger_defs.h (revision 7830)
+++ src/plugins/debuggergdb/debugger_defs.h (working copy)
@@ -222,9 +222,13 @@
}
bool valid; ///< Is this stack frame valid?
// 64 bit compatibility: don't use unsigned long int here:
+#if defined(_WIN64)
size_t number; ///< Stack frame's number (used in backtraces).
- // ...and here:
size_t address; ///< Stack frame's address.
+#else
+ unsigned long int number; ///< Stack frame's number (used in backtraces).
+ unsigned long int address; ///< Stack frame's address.
+#endif
wxString function; ///< Current function name.
wxString file; ///< Current file.
wxString line; ///< Current line in file.
...could you try this patch, please:CodeIndex: src/plugins/debuggergdb/debugger_defs.h
===================================================================
--- src/plugins/debuggergdb/debugger_defs.h (revision 7830)
+++ src/plugins/debuggergdb/debugger_defs.h (working copy)
@@ -222,9 +222,13 @@
}
bool valid; ///< Is this stack frame valid?
// 64 bit compatibility: don't use unsigned long int here:
+#if defined(_WIN64)
size_t number; ///< Stack frame's number (used in backtraces).
- // ...and here:
size_t address; ///< Stack frame's address.
+#else
+ unsigned long int number; ///< Stack frame's number (used in backtraces).
+ unsigned long int address; ///< Stack frame's address.
+#endif
wxString function; ///< Current function name.
wxString file; ///< Current file.
wxString line; ///< Current line in file.
why not always have both variables being of type unsigned long ?Because on 32 bit its unsigned long int, on 64 bit its unsigned long long (size_t).
did not try running or compiling contrib projects.Contrib plugins are not yet supported for 64 bit builds, 32 bit builds should not be affected.
why not always have both variables being of type unsigned long ?Because on 32 bit its unsigned long int, on 64 bit its unsigned long long (size_t).
Because on 32 bit its unsigned long int, on 64 bit its unsigned long long (size_t).
and for size_t "%zu"Uaaah - careful here, remember that this caused a silent crash? I would prefer a solution that uses a well established standard... hence I don't know any. :-(
Because on 32 bit its unsigned long int, on 64 bit its unsigned long long (size_t).
Yes, so, if I look at the ifdef posted above (note WIN64 --> what happens on linux 64 bit ??) :
if WIN64 bit --> size_t ==> 64 bits BUT unsigned long is also 64 bit on 64 bits machines
else (considering this means 32 bit !!!! ??)
unsigned long ==> 32 bits, but size_t is also 32 bits here
Meaning that either unsigned long can be used in both cases, or for that matter size_t can be used for both.
When using unsigned long for printf '%lu' can be used,
and for size_t "%zu"
Win 32 -
size_t => unsigned long int
Win 64 -
size_t => unsigned long long int
Linux 32 & 64 bit
size_t => unsigned long int
As far as I know size_t is usually the same as __SIZE_TYPE__Win 32 -
size_t => unsigned long int
__SIZE_TYPE__ => unsigned intWin 64 -
size_t => unsigned long long int
not testedLinux 32 & 64 bit
size_t => unsigned long int
Linux 32:
__SIZE_TYPE__ => unsigned int
Linux 64:
__SIZE_TYPE__ => long unsigned int
sizeof(int)=sizeof(long)=sizeof(unsigned long)=4
sizeof(int)=sizeof(long)=sizeof(unsigned long)=4
sizeof(long long)=sizeof(unsigned long long)=8
sizeof(int)=sizeof(long)=sizeof(unsigned long)=4
sizeof(int)=4
sizeof(long)=sizeof(unsigned long)=8
I guess you're after this specs: http://en.wikipedia.org/wiki/64-bit#64-bit_data_models
http://software.intel.com/en-us/articles/lessons-on-development-of-64-bit-cc-applications/They have an nice summary about size_t