Limited call stack when debugging 64 bit progs lazarus / 12-Debugger ---------------------------------------------------------------------- Pascal · 2018-06-01 11:13 Debugging 64 bit prog with 32 bit Lazarus: If program encounters an exception the call stack only shows current location! What can i do to see the full call stack? ---------------------------------------------------------------------- Thaddy · 2018-06-01 13:34 QuoteDebugging 64 bit prog with 32 bit Lazarus Really? You need a 64 bit capable debugger as well. So you also need a 64 bit capable GDB. The standard debugger is GDB for the platform. (Although with hoops and loops you - partially - may be be able to do that: from the GDB side, not the FPC or Lazarus side...). The address spaces are completely different. 64 bit GDB.... I am not aware that a standard 32bit GDB can debug all and any 64 bit code. ---------------------------------------------------------------------- Martin_fr · 2018-06-01 13:59 There are some reports about stepping in 64bit windows not always working as expected. It is unclear where this arises, but could be between fpc and gdb. (and may be dwarf related). As for stackframes.... 1) Make sure ALL units are compiled with either -O- or -O-1 fpc_ansistring_assign may have optimization, though if PRHighlighToken and ALL its callers have no optimization it should still be ok... Make sure you do not use smart linking in your project. Not sure, I dont think inlining is an issue here, but you may but a {$Inline off} in the unit in question. (though probably not the issue) 2) Try dwarf vs stabs Make sure ALL packages use the same. Mixing them is no good. Use "Additions and overrides" 3) Try the external linker -Xe ---------------------------------------------------------------------- Pascal · 2018-06-01 17:36 Quote from: Thaddy on June 01, 2018, 03:34:06 pmQuoteDebugging 64 bit prog with 32 bit Lazarus Really? You need a 64 bit capable debugger as well. So you also need a 64 bit capable GDB. The standard debugger is GDB for the platform. (Although with hoops and loops you - partially - may be be able to do that: from the GDB side, not the FPC or Lazarus side...). The address spaces are completely different. 64 bit GDB.... I am not aware that a standard 32bit GDB can debug all and any 64 bit code. Of course! If i hadn't used a 64 bit gdb i couldn't debug a 64 bit app ... ---------------------------------------------------------------------- Pascal · 2018-06-01 19:44 Quote from: Martin_fr on June 01, 2018, 03:59:17 pmThere are some reports about stepping in 64bit windows not always working as expected. It is unclear where this arises, but could be between fpc and gdb. (and may be dwarf related). As for stackframes.... 1) Make sure ALL units are compiled with either -O- or -O-1 fpc_ansistring_assign may have optimization, though if PRHighlighToken and ALL its callers have no optimization it should still be ok... Make sure you do not use smart linking in your project. Not sure, I dont think inlining is an issue here, but you may but a {$Inline off} in the unit in question. (though probably not the issue) 2) Try dwarf vs stabs Make sure ALL packages use the same. Mixing them is no good. Use "Additions and overrides" 3) Try the external linker -Xe Compiling fpc with "-gl -O-" instead of "-gl" made it work again. Thanks!