I was able to solve the initial problem where you can’t step anymore and the debugger freezes once you set a breakpoint inside a thread (even though it worked without a problem in the main() function). I fixed it in CubeMX. Go into the Middleware->Freertos section and there go to Config parameters. Here find the Software timers definitions and enable them. This fixed it for me.
I’m not sure why this fixes it though. Maybe it has to do with the way FreeRtos and HAL interact with the SysTick (I’ve read somewhere that there are 2 SysTicks or something in that direction).
But that would still not explain it fully as I was able to debug without Eclipse using openOcd and gdb-multiarch even in the threads. But even when I replicated the same setup in Eclipse the debug freeze error occurred. So for gdb+openocd enabling the software timer definitions was not necessarry.
So this solution might not be perfect (or at least I don’t understand it well) but at least the problem disappeared.