I experienced the following failed assertion when debugging Cortex-M4F code using floating point.
GCC-4-8-build/src/gdb/gdb/regcache.c:178: internal-error:
register_size: Assertion `regnum >= 0 && regnum <
(gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch))' failed.
All routine that pass a floating point value to the routine will failed when I set a breakpoint inside the routine. GDB crashes as soon as the break is encountered.
Kinetis Design Studio Version: 3.1.0
Eclipse Version: Luna SR2 (4.4.2)
解決済! 解決策の投稿を見る。
Hi Dan,
I heard back from PEMicro and fix should be next week. Exact wording:
We will post a new release of our GDB server mid-next week to our update site which has this fix.
Regards,
David
This is the compiler setting that I'm using,
Jim
7:29:35 **** Incremental Build of configuration Debug for project TEST****
make -j8 all
Building file: ../Source/main/TEST.c
Invoking: Cross ARM C Compiler
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mthumb-interwork -mfloat-abi=hard
-mfpu=fpv4-sp-d16 -Og -fmessage-length=0 -fsigned-char -ffunction-sections
-fdata-sections -fsingle-precision-constant -Wunused -Wuninitialized
-Wmissing-declarations -Wlogical-op -Waggregate-return -g3 -nostdinc
-D_AEABI_LC_CTYPE=C -D__STRICT_ANSI__=1 -D_DEBUG=1
-std=gnu11 -Wmissing-prototypes -Wstrict-prototypes
-fno-strict-aliasing -fms-extensions -finline-functions
-MMD -MP -MF"Source/main/BlackBox.d" -MT"Source/main/BlackBox.o"
-c -o "Source/main/TEST.o" "../Source/main/TEST.c"
Finished building: ../Source/main/TEST.c
Building target: MYCODE.elf
Invoking: Cross ARM C Linker
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mthumb-interwork
-mfloat-abi=hard -mfpu=fpv4-sp-d16 -Og -fmessage-length=0
-fsigned-char -ffunction-sections -fdata-sections
-fsingle-precision-constant -Wunused -Wuninitialized
-Wmissing-declarations -Wlogical-op -Waggregate-return
-g3 -T
-nostartfiles -nodefaultlibs -Xlinker --gc-sections
-Wl,-Map,"BlackBox.map" --specs=nano.specs -u _printf_float
-u _scanf_float -Xlinker -static -Xlinker -z -Xlinker muldefs
-o "BlackBox.elf" -Xlinker --start-group
-Xlinker --end-group
Finished building target: MYCODE.elf
I download Version v3.2.0 and get the same error.
The debugger will crash by setting a breakpoint in a subroutine that has a float value pass to the routine on the stack.
When the break is encountered the debugger crashes with "GCC-4-8-build/src/gdb/gdb/regcache.c:178: internal-error:
register_size: Assertion `regnum >= 0 && regnum < (gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch))' failed." in the console window. I was using CodeWarrior 10.3 and the same code work fine for me.
Also the register viewing window in KDS dose not show any of the FPU register.
Jim
Hello JIM,
Please update the KDS to KDS v3.2.0 to have a try , about the update steps, please refer to :
New Kinetis Design Studio v3.2.0 available
If still have this error , could you please tell me step by step how to reproduce this error .
Hope it hleps
Alice