[deleted]
> > >
> > > I expect that the GRUB shell will be built without
> optimization (because
> > > I'm going to debug it). However, the -O2 option is not
> suppressed, since
> > > it's hardcoded in stage2/Makefile.in
> >
> > I don't think -O2 disables you from debugging it. Do you have
> > another reason?
>
> You overestimate gdb or underestimate gcc :-(
> I have no other reason in the moment
>
I think I should add my two cents. It is widely known that most compiler
bugs come from their optimizations. Therefore, you always test your
programs with all optimizations off. This saves you countless hours of
debugging, just to find out it wasn't your bug at all. Furthermore, from my
own personal experience, the debug symbols don't always match up to the
optimized code which is produced--making debugging optimized code pointless.
chris