Re: Proposal: Debug option for translator
- Posted by Robert Craig <rds at R?pidEuphoria?com> Aug 30, 2007
- 615 views
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