Author Topic: Displaying thread names in the “Running Threads” debugger window.  (Read 2960 times)

Offline edwin

  • Multiple posting newcomer
  • *
  • Posts: 38
Hello,

Question:
Is there a way to display the name of a particular thread in the C::B IDE while debugging using the “Running Threads” debugger window?


Additional Info:
I am debugging a Linux application using C::B debugger branch SVN 6574. The code I am debugging has been ported over from Windows and is now targeted for Linux and Mac OS X.

When using Visual Studio debuggers (VC6 through VS2010), application code can set the name of a thread using the thread ID and by raising a specific exception. I usually do this during debug builds only.

Once this is done, the VS debugger interface in the IDE will display the name of the thread along with the other default thread info.

This makes working with many threads quicker and easier. Right now what I have done is to modify my thread creation/termination code so that a single global “Thread Manager” object is updated with appropriate thread Ids and thread names. This way I use the normal IDE watch window to inspect what threads are active and what each thread is supposed to be doing. It’s a bit clunky but it works.

I am still looking into this “debugger thread naming” for Linux and Mac OS X to see what is possible. If anyone has any additional information, that would be great.


Thank you,

edwin



Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Displaying thread names in the “Running Threads” debugger window.
« Reply #1 on: September 10, 2010, 08:10:02 pm »
If gdb can do it, it could be implemented in CB...but I think it can't...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]