This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Strange debug behavior with 4.4.3


Ian,

I rebuilt with -g -O, and to be fair it is slightly better. Now it just
repeats line sequences it has done before, and does present an overall.
sequence you can decipher if you have a rough idea what's coming.

Looks to me like the sequence AST -> Generic -> Gimple is already
chopping stuff out with no, or an incorrect, corresponding adjustment to
the debug info and that this can't be classified as optimization.
because it is just how the middle-tier works.

I see similar behavior with 4.3.4, so it's not something that just
happened.

I don't see how you could use it if you were looking at a genuine bug,
and did not really know what to expect.

Steve

On Wed, 2010-03-03 at 08:08 -0800, Ian Lance Taylor wrote:
> Steve Teale <steve.teale@britseyeview.com> writes:
> 
> > On Wed, 2010-03-03 at 07:40 -0800, Ian Lance Taylor wrote:
> >> Steve Teale <steve.teale@britseyeview.com> writes:
> >> 
> >> > (gdb) n
> >> > 6313	    input_location = EXPR_LOCATION (*expr_p);
> >> > (gdb) n
> >> > 6729				   post_p == &internal_post ? NULL : post_p,
> >> >
> >> > Things go pear shaped after line 6312 - after that, next seems to get
> >> > you somewhere rather arbitrary.
> >> 
> >> You are debugging optimized code.  Random jumps do happen.  You need
> >> to go further to see if there is a real problem here.
> >> 
> >> Ian
> >
> > Ian,
> >
> > Go further?
> 
> I mean: run the "n" command a few more times to see where you get to.
> 
> > So should I build the compiler with no optimization?
> 
> That is probably a good idea if you want to debug the compiler.
> 
> Ian



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]