AnsweredAssumed Answered

Breakpoing in ISR crashes NXP version of GDB

Question asked by Mike Cruse on Aug 1, 2016

Hi there,

I am having debugging issues with lpcxpresso version 8.2.0. It may affect version 8.1.4 as well.

The issue is with an LPCOpen based project on the LPC11U68 although I have noticed similar problems on an LPC1549 project.

 

The issue is simply that setting breakpoints in ISR's causes GDB to die. Here is the GDB console output.

 

GNU gdb (GNU Tools for ARM Embedded Processors) 7.10.1.20160210-cvs-LPCXpresso003

Copyright (C) 2015 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.  Type "show copying"

and "show warranty" for details.

This GDB was configured as "--host=i686-linux-gnu --target=arm-none-eabi".

Type "show configuration" for configuration details.

For bug reporting instructions, please see:

<http://www.gnu.org/software/gdb/bugs/>.

Find the GDB manual and other documentation resources online at:

<http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".

Type "apropos word" to search for commands related to "word".

0x1fff00a0 in ?? ()

Note: automatically using hardware breakpoints for read-only addresses.

 

Temporary breakpoint 1, main () at ../example/src/freertos_blinky.c:77

77        prvSetupHardware();

 

 

 

Program received signal SIGINT, Interrupt.

0x0000031c in vApplicationIdleHook () at ../freertos/src/FreeRTOSCommonHooks.c:76

76    }

 

Breakpoint 2, TIMER32_0_IRQHandler () at ../example/src/timer.c:38

38        if (Chip_TIMER_MatchPending(LPC_TIMER32_0, 0)) {

/media/workdisk/build/manual-builds/gcc-arm-none-eabi-5_3-2016q1-20160330/src/gdb/gdb/regcache.c:176: internal-error: register_size: Assertion `regnum >= 0 && regnum < (gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch))' failed.

A problem internal to GDB has been detected,

further debugging may prove unreliable.

Quit this debugging session? (y or n) [answered Y; input not from terminal]

 

This is a bug, please report it./media/workdisk/build/manual-builds/gcc-arm-none-eabi-5_3-2016q1-20160330/src/gdb/gdb/regcache.c:176: internal-error: register_size: Assertion `regnum >= 0 && regnum < (gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch))' failed.

A problem internal to GDB has been detected,

further debugging may prove unreliable.

 

 

Note that the preceding GDB output was produced while debugging the slightly modified freertos_blinky example project. I removed two of the led blink tasks and added a very simple timer ISR plus init code.

 

Even without the timer ISR,  just setting a breakpoint in the freertos systick ISR produces the same error followed by a terminated debug session.

 

I experimented a bit and made the following observations:

  1. A project that does not use freertos does not exhibit the problem
  2. Modifying the debug configuration to use the latest arm-none-eabi-gdb from launchpad fixes things

 

Is this a known bug with NXP's version of GDB?

 

Is there something I am missing or was testing debugging with freertos not in the test plan?

 

I have attached the project that I was using the figure out what was going on. Hope it helps.

 

I would appreciate some feedback on this issue as it has cost me several days in eliminating

possible hardware causes.

 

Regards,

 

Mike

 

 

Original Attachment has been moved to: gdb_freertos_test.tar.gz

Outcomes