This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] gdb/arm-tdep.c: Remove "Infinite loop detected" error message.
- From: Will Newton <will dot newton at linaro dot org>
- To: Richard Earnshaw <rearnsha at arm dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, Patch Tracking <patches at linaro dot org>
- Date: Wed, 20 Nov 2013 11:02:22 +0000
- Subject: Re: [PATCH] gdb/arm-tdep.c: Remove "Infinite loop detected" error message.
- Authentication-results: sourceware.org; auth=none
- References: <527D12A4 dot 6070109 at linaro dot org> <528B7E63 dot 90208 at arm dot com>
On 19 November 2013 15:06, Richard Earnshaw <rearnsha@arm.com> wrote:
> On 08/11/13 16:34, Will Newton wrote:
>>
>> Since as far back as the beginning of the sourceware repository
>> the ARM port has printed an error "Infinite loop detected" when
>> the next_pc calculated is the same as the current one, for example
>> when encountering a branch to the current PC address.
>>
>> This causes the test gdb.base/random-signal.exp as the error message
>> is not expected. I have not been able to find a good reason for the
>> message to be here so remove it and let the test pass.
>>
>> gdb/ChangeLog:
>>
>> 2013-11-08 Will Newton <will.newton@linaro.org>
>>
>> * arm-tdep.c (arm_get_next_pc): Remove "Infinite loop detected"
>> error message.
>
> I guess the reasoning for this is that you can't single-step a
> 'branch-to-self' instruction, since the next instruction (where the new
> breakpoint has to go) is the same as the current instruction.
>
> However, it ought to be the higher levels of GDB that handle this, not
> some random low-level function like get-next-pc.
Thanks, applied.
Single stepping an infinite loop works before and after this patch,
the patch just prevents an error message getting printed on every
step.
--
Will Newton
Toolchain Working Group, Linaro