Community
Participate
Working Groups
Created attachment 266155 [details] CDT Debug View - thread ids today (sequential, global) Since a few versions, GDB (on the CLI) had changed the way it displays its thread ids, whenever there is more than one inferior added to a debug session (the alternate display scheme sticks even if the session goes back to a single inferior later). With a single inferior, the thread ids reported are sequential and start at 1, incrementing with each created thread : (gdb) info thread Id Target Id Frame * 1 Thread 0x7ffff7fca780 (LWP 5466) "multipleThreads" (running) 2 Thread 0x7ffff6fd6700 (LWP 5485) "multipleThreads" (running) 3 Thread 0x7ffff67d5700 (LWP 5486) "multipleThreads" (running) 4 Thread 0x7ffff5fd4700 (LWP 5487) "multipleThreads" (running) 5 Thread 0x7ffff57d3700 (LWP 5488) "multipleThreads" (running) 6 Thread 0x7ffff4fd2700 (LWP 5489) "multipleThreads" (running) 7 Thread 0x7ffff47d1700 (LWP 5490) "multipleThreads" (running) 8 Thread 0x7ffff3fd0700 (LWP 5491) "multipleThreads" (running) 9 Thread 0x7ffff37cf700 (LWP 5492) "multipleThreads" (running) 10 Thread 0x7ffff2fce700 (LWP 5493) "multipleThreads" (running) (gdb) With more than one inferior, GDB switches to a scheme where the id is qualified with its inferior number. For example, thread 5 of inferior 1 would be reported as thread "1.5" : (gdb) info thread Id Target Id Frame 1.1 Thread 0x7ffff7fca780 (LWP 5466) "multipleThreads" (running) 1.2 Thread 0x7ffff6fd6700 (LWP 5485) "multipleThreads" (running) 1.3 Thread 0x7ffff67d5700 (LWP 5486) "multipleThreads" (running) 1.4 Thread 0x7ffff5fd4700 (LWP 5487) "multipleThreads" (running) 1.5 Thread 0x7ffff57d3700 (LWP 5488) "multipleThreads" (running) 1.6 Thread 0x7ffff4fd2700 (LWP 5489) "multipleThreads" (running) 1.7 Thread 0x7ffff47d1700 (LWP 5490) "multipleThreads" (running) 1.8 Thread 0x7ffff3fd0700 (LWP 5491) "multipleThreads" (running) 1.9 Thread 0x7ffff37cf700 (LWP 5492) "multipleThreads" (running) 1.10 Thread 0x7ffff2fce700 (LWP 5493) "multipleThreads" (running) * 2.1 process 7555 "bash" 0x000000000041eab0 in main () In CDT, we always use the first scheme, where the TID is sequential and global for all inferiors. However this can make things confusing for a user that compares the ids between the DV and the GDB console. It would be good to harmonize the displayed TIDs in both.
Created attachment 266156 [details] CDT Debug View - what it looks like with harmonized thread ids
New Gerrit change created: https://git.eclipse.org/r/88160
New Gerrit change created: https://git.eclipse.org/r/88161