STM32CubeIDE ThreadX RTOS Proxy breaks when thread name length > 20 characters
Environment:
STM32CubeIDE version: 1.16.1
MCU: STM32H753
RTOS: Azure RTOS ThreadX
Debug probe: ST-Link (V3)
RTOS Proxy plugin:
com.st.stm32cube.ide.mcu.externaltools.rtosproxy.win32_1.1.1.202408301240OS: Windows
Issue description:
RTOS-aware debugging for ThreadX breaks completely when at least one ThreadX thread name length exceeds ~20 characters.
ThreadX itself has no limitation on thread name length (thread name is CHAR *).
However, STM32CubeIDE RTOS-aware debug stops working if any thread name is longer than ~20 characters.
When this happens:
RTOS thread list becomes incomplete or unusable
Switching between threads is not possible
Call stack for inactive threads is missing
GDB console shows warnings like:
warning: while parsing threads: not well-formed (invalid token)
RTOS-aware debugging works correctly only when all ThreadX thread names fit into a 20-byte buffer including the null terminator (maximum 19 visible characters).
The issue is 100% reproducible.
Steps to reproduce:
Create a ThreadX project in STM32CubeIDE
Create several ThreadX threads
Set one thread name longer than 20 characters
(e.g. "Disk Manager Init Thread")Start debug with RTOS-aware debug enabled
Result: RTOS thread list and RTOS debug functionality break
Shorten all thread names to ≤ 20 characters
Restart debug
Result: RTOS-aware debug works correctly
Additional observations:
The problem does not depend on:
MCU type
number of threads
ThreadX configuration
The issue appears to be inside RTOS Proxy implementation
It looks like an internal fixed-size buffer / missing string length check
Large qXfer:threads:read packets are supported, but offset/chunk handling is broken
A single long thread name is enough to break the entire RTOS debug view
Expected behavior:
RTOS-aware debug should work regardless of ThreadX thread name length, or at least handle long names safely without breaking XML parsing and RTOS debug functionality.
Workaround:
Manually limit all ThreadX object names to ≤ 20 characters.
