Re: [Lazarus] Watch List shows absolute rubbish
On Fri, 14 Oct 2016 23:09:38 +0100 Graeme Geldenhuys via Lazarus wrote: >[...] > I finally found the cause of the problem. I don’t use build modes in > Lazarus, so only ever looked at the “Project Options -> Compiler Options > -> Compilation and Linking” screen. That’s where I set the -O- option, > and I also set other debugging options in the “Compiler Options -> > Debugging” screen, like the -gl and -gh options. > > What I didn’t realize was that inside “Compiler Options -> Additions and > Overrides”, there was a “Stored in IDE” custom option (there are > actually a few defined), and one of the active options was -O2. And that > optimisation option is what caused all the trouble. > > Lovely conflicting options with no warning. The IDE now warns. Note that they are not "conflicting". Overriding a flag is a common thing. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Watch List shows absolute rubbish
On 2016-10-14 20:45, Martin Frb via Lazarus wrote: > Ok, thats a first, never seen that before. I finally found the cause of the problem. I don’t use build modes in Lazarus, so only ever looked at the “Project Options -> Compiler Options -> Compilation and Linking” screen. That’s where I set the -O- option, and I also set other debugging options in the “Compiler Options -> Debugging” screen, like the -gl and -gh options. What I didn’t realize was that inside “Compiler Options -> Additions and Overrides”, there was a “Stored in IDE” custom option (there are actually a few defined), and one of the active options was -O2. And that optimisation option is what caused all the trouble. Lovely conflicting options with no warning. Personally I think the Compiler Options screens in Lazarus is a huge confusing mess. The IDE dialog designers should take some cues from MSEide’s Project Options dialog. In MSEide all build/make option are located in one place/screen with an instant overview of all build modes. What you see is what you get. No hidden settings from other screens. Anyway. Thank you very much Martin for taking the time in trying to help me. I apologise for my heated messages from earlier. At that point I wasted so many hours, and were at boiling point for some time. That probably wasn’t the best time to write a message either. Regards, Graeme -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Watch List shows absolute rubbish
On 14/10/2016 19:14, Graeme Geldenhuys via Lazarus wrote: On 2016-10-14 18:45, Martin Frb via Lazarus wrote: And the same compiler settings? Both have the exact same compiler settings... -l -Mobjfpc -Sh -Sc -Si -gl -O- -gh -dUseCThreads -viewn I excluded the unit paths from the above list of compiler options. Ok, thats a first, never seen that before. Can you produce a logfile http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Log_info_for_debug_session If you open the "locals" window, it should have "i", same error? What happens in mseide, if you type/watch uppercase I or FSHOWDELETED ? For info, some previous gdb, did not find some variables, unless they where uppercased. Normally gdb ignores case, so Lazarus uppercases all vars, and that worked fine in the past. Maybe gdb 7.11[.1] has an issue with this? Btw, I have no idea why some are grey. I would think either selection or focus? -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Watch List shows absolute rubbish
On 2016-10-14 18:45, Martin Frb via Lazarus wrote: > And the same compiler settings? Both have the exact same compiler settings... -l -Mobjfpc -Sh -Sc -Si -gl -O- -gh -dUseCThreads -viewn I excluded the unit paths from the above list of compiler options. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Watch List shows absolute rubbish
On 14/10/2016 17:02, Graeme Geldenhuys via Lazarus wrote: On 2016-10-14 16:48, Graeme Geldenhuys via Lazarus wrote: How the hell is one supposed to do debugging like this?? I guess the answer is to simply use MSEide to debug LCL applications (and all other applications too). Attached is a screenshot of the same watch list and also in the first iteration of the for loop. NOTE that MSEide does just fine displaying the _real_ values in the Watch List window. MSEide was running under the exact same environment as what my Lazarus IDE did. Using the same FPC compiler and GDB debugger. And the same compiler settings? Both on -O1 ? (or whatever level) Such incorrect results are sometimes caused by -O1, while -O- will be fine. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Watch List shows absolute rubbish
On 2016-10-14 16:48, Graeme Geldenhuys via Lazarus wrote: > How the hell is one supposed to do debugging like this?? I guess the answer is to simply use MSEide to debug LCL applications (and all other applications too). Attached is a screenshot of the same watch list and also in the first iteration of the for loop. NOTE that MSEide does just fine displaying the _real_ values in the Watch List window. MSEide was running under the exact same environment as what my Lazarus IDE did. Using the same FPC compiler and GDB debugger. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus