Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Proposed change in thread naming

Marc,

As you said, in the simple case when there is just one thread we would show "MyProcess" as the program and "MyProcess" as the thread name. I think this is confusing, especially for new users. What if we do the same as JDT does by showing the thread's name in the brackets plus thread's index if there is more than one thread with the same name? For instance, Thread [Worker-1].

Mikhail

On 25/11/2014 1:41 PM, Marc Khouzam wrote:
Hi,

for a while GDB has been providing the name of each thread of a process.  We were not making use of that information but instead using the string "Thread" in the Debug view.  http://eclip.se/378154 aims to improve this and show users the real name of each thread.

Say the program explicitly names its threads "Worker" and "Heartbeat":

MyProcess                will become           MyProcess
   - Thread [1]                                                  - Worker [1]
   - Thread [2]                                                  - Heartbeat [2]

This is obviously better as it shows the user the names she has chosen.  However, if the program does _not_ name its threads, we will now show them as they are really known by the OS instead of using "Thread". I feel that this is the correct thing to do anyway but I wanted to bring up this UI change to the community.  So, with the proposed changed, on Linux for example, a process where the user does not care to name the threads

MyProcess                will become           MyProcess
   - Thread [1]                                                  - MyProcess [1]
   - Thread [2]                                                  - MyProcess [2]

On Linux, the first thread is named like the process and each thread takes the name of the thread that created it.  So, effectively, we'll most often see every thread name be the same as the process name.

If the user were to list thread names using any other tool, the names would be as we now propose to show them, as that is the real name of the thread for the OS.  So, I feel this change makes sense.

Any comments?  I'll wait the week to see if anyone has an opinion, and if not, I'll commit the change.

Thanks

Marc

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev



Back to the top