Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » How To Update Thread Names in the Debug View
How To Update Thread Names in the Debug View [message #1076080] Tue, 30 July 2013 13:22 Go to next message
Carmen Casaru is currently offline Carmen Casaru
Messages: 6
Registered: July 2013
Junior Member
Hello,

We are using CDT/CDI and are trying to update thread names for local applications.

We have figured out how to update the thread names after the target is suspended, but we are not sure how/if we can trigger an update so that the Debug View shows the new names.

The new names do show up after we resume.

Is there a way to force the Debug View refresh while we are still in suspended state?

Thank you,
Carmen
Re: How To Update Thread Names in the Debug View [message #1080828 is a reply to message #1076080] Tue, 06 August 2013 08:23 Go to previous message
Carmen Casaru is currently offline Carmen Casaru
Messages: 6
Registered: July 2013
Junior Member
Hello,

I've managed to find a solution for my problem. The idea is to fire a ChangeEvent for each thread within the target thread list, while in suspended state. This will refresh the thread info in the debug view.

CDebugTarget cTarget = (CDebugTarget) target;
IThread[] iThreadList =  cTarget.getThreads();

for (int i =0; i < iThreadList .length; i++)
{
   ((CThread)iThreadList[i]).fireChangeEvent( DebugEvent.CONTENT );
}

Here target is of IDebugTarget type.

Previous Topic:How to configure eclipse to compile/run 32bit code under 64bit linux environment
Next Topic:Custom Project using CDT indexing
Goto Forum:
  


Current Time: Thu Jul 24 23:57:08 EDT 2014

Powered by FUDForum. Page generated in 0.01636 seconds