Topic: Questions on debugger and code optimization
I have made significant progress in converting my simulation code over to the SF/GNU FORTRAN. However, I have reached a point (after much poking/hacking around) where I am stuck. Two things plague me right now and I am not sure how to proceed.
During testing of the many options in my code I noticed that things behaved strangely. Upon debugging, it appears as though the spaghetti code (which I use to initialize my system variables though all the possible options) has selective lines of code optimized out (which you might imagine are there for a reason). While trying to understand what and why this might be happening and to which lines of code, the debugger has stopped working, at least the way it was before.
I can't really proceed until I can get the debugger working to tell me which lines of code are affected by the optimizer. I also need to know if there is a compiler directive that I can select areas of code not to be optimized. I have looked for this option but don't see anything.
However the debugger is my immediate problem. When I open it up, all seems normal. I open the executable to be debugged and then it opens the code in the window for a brief second (as what was normal before) but then goes blank with the following message:
"Select function name to disassemble"
I can reopen the code again, but can't step into anything or run to break points. I know I must be doing something really stupid but I can't seem to get it doing what it was before. I will freely admit, I have little understanding of how a real programmer would use these tools but it is similar to the MS FORTRAN debug tool that I have used.
Thanks for your help.
Rod