maxikrie commented on issue #18109:
URL: https://github.com/apache/nuttx/issues/18109#issuecomment-6427282482
@acassis @PetervdPerk-NXP I could reproduce a broken J-Link thread view on
an nRF52840-DK (master b9d1d6a834, J-Link V9.82, gdb-multiarch 13.1) and it
depends on where the linker puts `g_tcbinfo`, which may be why it can't be
reproduced on every build:
1. `struct tcbinfo_s` is packed, so `g_tcbinfo` can be at an odd address.
GDB then reports it with bit 0 cleared (`p &g_tcbinfo` ->
0x1987a for 0x1987b) and the plugin reads all offsets one byte off:
wrong priorities/states, missing threads. #21023 aligns it. @PetervdPerk-NXP,
could you check `readelf -s nuttx | grep g_tcbinfo` on your build? An odd
address would confirm it's this.
2. Separately: `g_tcbinfo` is only linked in when something references it
(procfs tcbinfo, coredump, gdbstub). `used_data` doesn't pull an object out of
`libarch.a`. Without one of those, the J-Link server says `ERROR: Mandatory
symbol g_tcbinfo not found.` and shows a single thread 57005 (0xDEAD). E.g.
`nrf52840-dk:nsh` has `FS_PROCFS` off.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]