On 2012-04-05 08:17:57 -0400, Robert Dewar wrote:
> On 4/5/2012 8:06 AM, Vincent Lefevre wrote:
> >But no-optimizations (-O0) should not necessarily be the default
> >for these reasons.
> 
> I think it is a problem that even at -O1 the debugger is
> seriously limited, especially for an inexperienced user.

OK.

Now, AFAIK, compiling and running programs occurs much more often
than debugging them. So, I would say that -O1 should be the default.
The user can still recompile his program with -O0 (or future better
option) if he needs to run the debugger on it; if he doesn't know
that, there should be some feature in the debugger to tell the user
what to do.

> What is missing to me is a reasonable cleanup of the code that
> would remove some of the junk at -O0 but not impact debugging.
> In fact a reasonable criterion would be all the optimization
> that is cheap to do and does not affect debugging.

I think that for debugging, there should be a single option to
disable optimizations that are unsafe for the debugger and that
would add debugging information (such as what -g does). In short,
the user would just have to add this option, which should do all
the magic for debugging.

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Reply via email to