This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PING] [PATCH] Fix gdb.fortran/array-element.exp failures.
- From: Gabriel Krisman Bertazi <gabriel at krisman dot be>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 09 Sep 2014 15:17:18 -0300
- Subject: Re: [PING] [PATCH] Fix gdb.fortran/array-element.exp failures.
- Authentication-results: sourceware.org; auth=none
- References: <m3iondcf2h dot fsf at redhat dot com> <87zjgobth0 dot fsf at Argo dot krisman dot be> <m3pphk9f53 dot fsf at redhat dot com> <8761jbbu6l dot fsf at Argo dot krisman dot be> <m3bnt28g3s dot fsf at redhat dot com> <87lhrv36pm dot fsf at Argo dot krisman dot be> <87zjf3sqrd dot fsf at krisman dot be> <87r4048546 dot fsf_-_ at krisman dot be> <20140909130901 dot GG28404 at adacore dot com> <87d2b4c07h dot fsf at anubis dot Home> <20140909154531 dot GJ28404 at adacore dot com>
Joel Brobecker <brobecker@adacore.com> 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.
Thanks,
--
Gabriel Krisman Bertazi