Vidyabhushan Mohan wrote on Wednesday 30 January 2013, 17:39:47:
> Hi,
> I have been using Marss to simulate parsec/spec workloads and so far things
> have been great. I was debugging one of my simulation runs in debug mode
> (scons debug=1 core=8) but I found out that most of the local variables and
> some of the function arguments were optimized out and I had to resort to
> debugging the assembly. When I checked the script in ptlsim/SConstruct, I
> see this piece of code (lines 33-38):
> 
> 
> if int(debug):
>     env.Append(CCFLAGS = '-g')
> 
>     # If debugging level is 1 then do optimize
> 
>     if int(debug) == 1:
>         env.Append(CCFLAGS = '-O')
> 
> 
> Was it intentional to *enable* optimization when debug =1 is specified?
> Since I do not want any optimizations enabled in the *debug* build, I could
> sidestep this by specifying, for example debug =2. But I still wanted to
> confirm if enabling optimization (for debug=1) was intentional. If not,
> perhaps we could change it to -O0.

Personally I find that -O0 code is a pain to look at, but I do rely on
the assertions and extra printouts.  Furthermore, I am  almost always
looking at the assembly directly...

So maybe having both options (explicitly) would be good?

Stephan



_______________________________________________
http://www.marss86.org
Marss86-Devel mailing list
[email protected]
https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel

Reply via email to