I know the comments in the makefile say that we should
not remove the -O2,
but is there any way around this? The optimizations make gdb behave very
funkily in lots of places.
Debug gcc? :(
The last time I built a kernel without -O2 it didn't even get as far
as kmain().
You can try it, but I doubt it'll work any better for you than for
me. You could also try -O1, which is likely to make gdb happier. I
don't know if that will work or not - based on what I've heard about
the mips gcc, I expect probably not.
A reasonable question would be "why are we using MIPS, then, if the
compiler's broken?"
The answer is, more or less: cs161 has always used MIPS in the past
without much trouble. By the time we realized there was a problem, it
was too late to switch - we might have been able to switch if there
were another simple architecture we had in-house experience with, but
there wasn't.
--
- David A. Holland | VINO project home page:
dholland(a)eecs.harvard.edu |
http://www.eecs.harvard.edu/vino