This is the mail archive of the mailing list for the GDB 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: [PING] [PATCH] Fix gdb.fortran/array-element.exp failures.

Joel Brobecker <> writes:

> The problem is that this does not tell me what was wrong. Just that
> some tests did not pass. Although your change seems OK at first glance,
> I'd like to do know what it was that did not match, and why it's OK
> stop trying to match it now.

Joel, thanks for your clarification.

Ok, so we got this situation:

The original testcase sets a breakpoint at the label continue and
resumes execution until we reach it.  On the Fortran file, this means
the inferior has iterated over the whole loop before reaching the
breakpoint for the first time.  Then, the original testcase issues
another continue command, causing the inferior to finish the execution
earlier than expected, since we still want to make a final test on
whether we print the second element.  This causes the two test failures.

My guess is that the original author meant to break after each loop
iteration, instead of going all the way until the continue label.

Nevertheless, stepping over a single iteration or stopping after the
entire loop has no impact on the test results.  So, what my patch does
is simply remove the second "continue" command that would prematurely
end inferior's execution, so we can actually test whether both elements
are printed correctly after executing the loop.

Other than that, when I first submitted this patch, Sergio asked me to
simplify the testcase, because it felt unusual.  That is what the other
modifications are about.

I'll make sure to update the commit message to include part of this
explanation to better clarify what this patch is really about.


Gabriel Krisman Bertazi

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