This is the mail archive of the gdb-patches@sourceware.org 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: [PATCH] gdb/arm-tdep.c: Remove "Infinite loop detected" error message.


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


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