How do you debug threads?
Can you elaborate on what you meant by "debug threads"? What do you want to be debugged in the threads?
1. view list of running threads (gdb: info threads)
2. switch between threads and look: what is instruction/function run now, what registers (gdb: thread #/frame #/bt)
3. view thread structures and so on.
Currently if I stop core SP and PC registers may points to random location and I can see backtrace only for current stack (that pointed by SP).
Threads is a ThreadX entity. OpenOCD supports ThreadX but only for Cortex-M3 and Cortex-R4 cores. Tomorrow I will try my patched OpenOCD version with arm926ejs support. May be it will be work :-)