Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tcf-dev] Are there events in TCF which are equivalent to DebugEvent.CREATE and DebugEvent.TERMINATE
  • From: Gidi Gal <gidigal@xxxxxxxxxxx>
  • Date: Wed, 5 Feb 2020 23:07:02 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4Qw4reT7oY7GTYz/srDgES8cY8t0qpQk26SCwGdPlu4=; b=ARIv9tK/YbDZIJx58cjk1hx73DOPJOyAAbIzn2D94ElA6wfcMhvasPNZYsEpwMREuKN3h8KGosO94tDSFomo+j/wjpzV9bKyo/8CZUQBawoYd+ui5zKYIiONSeKvzw0rrLjk4SHbb0FlGvxfo9Pu79gYr/Q+KeW8hrqw5kCb+mXD3Mpzy2p8WHyELG1dSf4jOCtKYHVxIeIV+WfBJ9f9TVx8mH5sey4ks3Eqhu28N5NxmZfiZP4XLUuC1JjtLD9J7u7Q5p6uGVCx/4cJR9fYLTPPZLBB+VTth+y2ftOHx6+IgJ0B8pRaGTsd8QOWAd2pvQMLSvSU37PpL1ZfyDjG3g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YjTR4pJ/Xj/8hPaSv1ncq+wmoIlAIq2rcCDmJxgkTWgEnOvz16HQ1d5XrbEAbs+c4XJ+DgLLhHX3GDY8mDTka6p76j+mpAREVuz0PeXtent5IiXl44hX04Bu4DlNMpNhuhOl3LbHiK7T67PymgArlZgXwhnO0gQCWDQbP2nNYz+NmGAEdHm/HAGol9M6WTTYKjx5Nv17SKBJL4TE2VDbn6zm1j7ydm5pQX0GVunWLS0p5w3Sg41MFVBzraW385zuC+SdwhkUm1vUqLKRy+bJ2CNReckHzVXUN8YqQoIu55zSn5rw2brtcMsaC1kLr9ihn7h8ua/NtrXhzQdpfCjMuw==
  • Delivered-to: tcf-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/tcf-dev>
  • List-help: <mailto:tcf-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/tcf-dev>, <mailto:tcf-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/tcf-dev>, <mailto:tcf-dev-request@eclipse.org?subject=unsubscribe>
  • Thread-index: AQHVy5xjfvPYR1+pzUuMu80qRfY+QKfr89fggCFgcjs=
  • Thread-topic: [tcf-dev] Are there events in TCF which are equivalent to DebugEvent.CREATE and DebugEvent.TERMINATE

Hi Eugene,

Thanks for you reply.
I tried listening to TCFLaunch.LaunchListener and then add listener to IRunControl remote service. Attached testTCF contains the sample code I was testing.
I tested it against attached TestThreads.cpp (attached as well). I was expecting to get two calls to contextAdded.

The printout I received is as follows:
contextResumed: context: P13500.13500
contextChanged: id: P13500 name: null
contextSuspended: context: P13500.13500 pc: 94384029830905 reason: Suspended
contextResumed: context: P13500.13500
contextAdded: id: P13500.13503 name: null

So, it seems that I missed the first callback to contextAdded. Should I use the API differently ?

One more question: I'd like to store TCFLaunch instances in a map. Is there a unique id for TCFLaunch I can use as a key ?

Thanks,
Gidi


From: tcf-dev-bounces@xxxxxxxxxxx <tcf-dev-bounces@xxxxxxxxxxx> on behalf of Eugene Tarassov <eugenet@xxxxxxxxxx>
Sent: Wednesday, January 15, 2020 5:12 PM
To: TCF Development <tcf-dev@xxxxxxxxxxx>
Subject: Re: [tcf-dev] Are there events in TCF which are equivalent to DebugEvent.CREATE and DebugEvent.TERMINATE
 

Hi Gidi,

 

Debug model in org.eclipse.debug.core is useless legacy.

It is way too primitive to represent TCF debug session.

TCF debugger implements its own debug model.

 

> What events are equivalent to CREATE and TERMINATE ?

 

contextAdded and contextRemoved

 

Regards,

Eugene

 

 

From: tcf-dev-bounces@xxxxxxxxxxx <tcf-dev-bounces@xxxxxxxxxxx> On Behalf Of Gidi Gal
Sent: Wednesday, January 15, 2020 4:13 AM
To: tcf-dev@xxxxxxxxxxx <tcf-dev@xxxxxxxxxxx>
Subject: [tcf-dev] Are there events in TCF which are equivalent to DebugEvent.CREATE and DebugEvent.TERMINATE

 

EXTERNAL EMAIL

Hello,

 

The debug mechanism in org.eclipse.debug.core.DebugEvent send 4 events which are important to me:  CREATE, TERMINATE, SUSPEND, RESUME. Regarding SUSPEND and RESUME - The events in IRunControl.RunControlListener provide a replacement. What events are equivalent to CREATE and TERMINATE ? I tried to listen to these DebugEvent events during the launch of debug session in WindRiver Workbench 4, which is based on TCF. I don't see them being triggered.

 

Thanks,

Gidi

//============================================================================
// Name        : TestThreads.cpp
// Author      : 
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include <thread>
using namespace std;

void foo()
{
	while (1)  {
		cout << "foo" << endl;
		std::this_thread::sleep_for(std::chrono::milliseconds(1000));
	}

}

int main() {

	std::thread thread_obj(foo);


	while (1)  {
		cout << "Hello World!!!" << endl; // prints Hello World!!!
		std::this_thread::sleep_for(std::chrono::milliseconds(1000));
	}

	return 0;
}

Attachment: Makefile
Description: Makefile

Attachment: testTCF.zip
Description: testTCF.zip


Back to the top