This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix PR 17206
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>, gdb-patches at sourceware dot org
- Date: Mon, 28 Jul 2014 15:26:48 +0100
- Subject: Re: [PATCH] Fix PR 17206
- Authentication-results: sourceware.org; auth=none
- References: <1406547056-22541-1-git-send-email-yao at codesourcery dot com> <53D6441B dot 3050702 at redhat dot com> <53D6511E dot 3040404 at codesourcery dot com>
On 07/28/2014 02:33 PM, Yao Qi wrote:
> On 07/28/2014 08:37 PM, Pedro Alves wrote:
>> This looks right, but, could we add a test to the test suite?
>
> Sure, how about the test below? Without the fix, I get the fail
>
> FAIL: gdb.base/until-range-step.exp: until 2 (GDB internal error)
>
> on x86-linux and arm-none-eabi. With the fix applied, the fail goes
> away. I am not sure the test case name is good or clear enough.
>From a high-level perspective, the issue triggered when you did
"until" and PC pointed somewhere we had no debug info for, and there
was no breakpoint at PC that needed to be stepped over. That is
main use case and code path that we didn't have a test for.
Note that although it happened to be a range-stepping-related assertion
that triggered, the code was wrong even without range-stepping. E.g.,
if the instruction at PC is a conditional jmp to PC (like a spinlock),
even without range-stepping, "until" should continue stepping until
PC moves past the jump (that's the whole point of until), while
it was stopping after one single-step, thus still pointing at the
same PC.
So I think "until-nodebug.exp" would be a good name for this test.
> Maybe we can rename it to pr17206.exp or something else.
We avoid such numeric names that make it harder to tell what's
being exercised.
The test itself looks good. Thanks!
Pedro Alves