I am using an STM32F746 with Chibios 19.1.3 and a J-Link debugger (latest firmware/gdb server) and the latest arm-none-eabi-gdb.
When debugging, I get incorrect double value readout. Integer values are fine, though.
For example, I have a certain variable that reads as follows in gdb:
Code: Select all
p dds.dds_set->fref
$1 = 5.4493361955084617e-315
Especially:
Code: Select all
x/g &(dds.dds_set->fref)
0x20009d90 <dds_set>: 0x41bdcd6500000000
Specifying the size of the value at test does not help:
Code: Select all
x/fg &dds.dds_set->fref
0x20009d90 <dds_set>: 5.4493361955084617e-315
However, I know from caluclations that this value is actually 500e6 in memory. Putting the hex number into a double conversion tool, it indeed reports 500e6.
This is very likely not a ChibiOS problem, but maybe someone still knows a reason.
Compiler options are:
Code: Select all
# Compiler options here.
-O0 -ggdb -fomit-frame-pointer -falign-functions=16 -lm
Thanks in advance,
Adrian