diff --git a/tools/nuttx-gdbinit b/tools/nuttx-gdbinit index 2266bf4e5f..89c95bf9c1 100644 --- a/tools/nuttx-gdbinit +++ b/tools/nuttx-gdbinit @@ -48,9 +48,15 @@ define _examine_target if ($_target_examined == 0x0) _examine_arch - python gdb.execute("set $_target_has_fpu = 0") - python if (type(gdb.lookup_global_symbol("fpuconfig")) is gdb.Symbol) : \ - gdb.execute("set $_target_has_fpu = 1") + set $_tcb0 = g_pidhash[0].tcb + set $_xcp_nregs = sizeof($_tcb0->xcp.regs) / sizeof($_tcb0->xcp.regs[0]) + set $_target_has_fpu = 0 + + if ($_streq($_target_arch, "armv7e-m") == 1) + if ($_xcp_nregs != 19) + set $_target_has_fpu = 1 + end + end python gdb.execute("set $_target_has_smp = 0") python if (type(gdb.lookup_global_symbol("g_assignedtasks")) is gdb.Symbol) : \