1. Proposal: Debug option for translator
- Posted by Matt Lewis <matthewwalkerlewis at ??ail.com> Aug 30, 2007
- 631 views
- Last edited Aug 31, 2007
I've submitted a new feature request on sourceforge to allow the translator to build debug versions of translated programs. Most users may not be interested in using this feature. It's probably more useful to developers for debugging the translator or other compiled code (I've been doing this manually for debugging wxEuphoria). I've got some of the code working. Does anyone have an objection or suggestion regarding this? Below is the proposal as it exists on sourceforge: http://sourceforge.net/tracker/index.php?func=detail&aid=1785187&group_id=182827&atid=902785 A new command line switch to build a debug version of a translated program. Also an optional parameter to specify an optional runtime library (presumably a debug library). The switch would cause an additional compiler switch to generate debug information (-g3 for gcc and Watcom, TBD for other compilers) and to suppress the -fomit-frame-pointer switch for gcc (this switch can confuse debugging tools like valgrind). ecu -debug myapp.exu ecu -debug=decu.a myapp.exu
2. Re: Proposal: Debug option for translator
- Posted by DB James <larches at comcast.n?t> Aug 30, 2007
- 608 views
- Last edited Aug 31, 2007
Matt Lewis wrote: > > I've submitted a new feature request on sourceforge to allow the translator > > to build debug versions of translated programs. Most users may not be > interested in using this feature. It's probably more useful to developers > for debugging the translator or other compiled code (I've been doing this > manually for debugging wxEuphoria). > > I've got some of the code working. Does anyone have an objection or > suggestion regarding this? Below is the proposal as it exists on > sourceforge: > > <a > href="http://sourceforge.net/tracker/index.php?func=detail&aid=1785187&group_id=182827&atid=902785">http://sourceforge.net/tracker/index.php?func=detail&aid=1785187&group_id=182827&atid=902785</a> > A new command line switch to build a debug version of a translated program. > Also an optional parameter to specify an optional runtime library > (presumably a debug library). > > The switch would cause an additional compiler switch to generate debug > information (-g3 for gcc and Watcom, TBD for other compilers) and to > suppress the -fomit-frame-pointer switch for gcc (this switch can confuse > debugging tools like valgrind). > > ecu -debug myapp.exu > > ecu -debug=decu.a myapp.exu Hard to imagine any of us in our Barcaloungers saying someone on the front lines shouldn't have what he says he needs. Only suggestion is something you probably have covered already: to keep other developers informed in detail. Maybe they will have good ideas about that debug.e file. --Quark
3. Re: Proposal: Debug option for translator
- Posted by Robert Craig <rds at R?pidEuphoria?com> Aug 30, 2007
- 616 views
- Last edited Aug 31, 2007
Matt Lewis wrote: > I've submitted a new feature request on sourceforge to allow the translator > > to build debug versions of translated programs. Most users may not be > interested in using this feature. It's probably more useful to developers > for debugging the translator or other compiled code (I've been doing this > manually for debugging wxEuphoria). > > I've got some of the code working. Does anyone have an objection or > suggestion regarding this? Below is the proposal as it exists on > sourceforge: > > <a > href="http://sourceforge.net/tracker/index.php?func=detail&aid=1785187&group_id=182827&atid=902785">http://sourceforge.net/tracker/index.php?func=detail&aid=1785187&group_id=182827&atid=902785</a> > A new command line switch to build a debug version of a translated program. > Also an optional parameter to specify an optional runtime library > (presumably a debug library). > > The switch would cause an additional compiler switch to generate debug > information (-g3 for gcc and Watcom, TBD for other compilers) and to > suppress the -fomit-frame-pointer switch for gcc (this switch can confuse > debugging tools like valgrind). > > ecu -debug myapp.exu > > ecu -debug=decu.a myapp.exu Sounds good to me. If no one objects soon, please go ahead. People should also remember that:
with trace trace(3)
works with the translator. It will produce a ctrace.out file of the last 500 Euphoria statements executed before a crash. Debugging translated code can be very painful, though this is mainly something that the developer(s) of the translator have to worry about. Any additional help in this area would be very desirable. By the way, did you ever look into the ecw bug recently reported by Igor? I assumed it might be due to your default file extension change: http://www.openeuphoria.org/EUforum/m16120.html Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
4. Re: Proposal: Debug option for translator
- Posted by Matt Lewis <matthewwalkerlewis at gma??.com> Aug 31, 2007
- 653 views
Robert Craig wrote: > > Matt Lewis wrote: > > I've submitted a new feature request on sourceforge to allow the translator > > > > ecu -debug myapp.exu > > > > ecu -debug=decu.a myapp.exu > > Sounds good to me. > If no one objects soon, please go ahead. > > People should also remember that: > }}} <eucode> > with trace > trace(3) > </eucode> {{{ > works with the translator. > It will produce a ctrace.out file of the last 500 > Euphoria statements executed before a crash. Yeah, my change is strictly C-level debugging, so most people will probably never use it. Ultimately, the only change in output will be to the emake file. > Debugging translated code can be very painful, > though this is mainly something that the developer(s) > of the translator have to worry about. > Any additional help in this area would be very desirable. Yep. And it was driving me nuts trying to track down a memory leak when valgrind would end the traceback at NewS1. Finally stumbled across something in the online docs that said that -fomit-frame-pointer could lead to confusing/incomplete results. > By the way, did you ever look into the ecw bug > recently reported by Igor? I assumed it might > be due to your default file extension change: > http://www.openeuphoria.org/EUforum/m16120.html Could be. I get that result using 3.1.1, but the trunk works as expected. I love it when bugs fix themselves. Matt