Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Multi-core How configure GDB session programmatically ?

Hi Christelle,

I understand now.  You want to launch a session that debugs two binaries, without forcing the user to manually add the second binary each time.
This is something that "the new launch UI" was aiming to do, but the work on it never got completed.  It would have allowed to specify many
binaries to debug, directly from the launch configuration main tab.
That effort was also changing the look and feel of the UI, which could be why it was a lot of work
and never got finished.  There is a prototype on github (which may be too detailed for your needs)
https://wiki.eclipse.org/CDT/MultiCoreDebugWorkingGroup/NewLaunchUI

The approach you mention, of adding extra widgets to the main launch tab seems fine.
After that, you need to add the step to launch that second binary.  The initial setup of the debug session is done in
FinalLaunchSequence.java and its sub classes.  Looking at FinalLaunchSequence.getExecutionOrder() you will
see a list of steps done by CDT to configure the session; each step corresponds to a method of the same name.
One such step is FinalLaunchSequence.stepNewProcess() which launches the first binary.
You should be able to add an extra step right after, which does the same thing but using the second binary's info
from the launch configuration.  There might be a couple of details to work out, but it shouldn't be hard at all.

To extend FinalLaunchSequence you can look at the how it is done in FinalLaunchSequence_7_0.

Let us know how it goes.

Marc

From: cdt-dev-bounces@xxxxxxxxxxx [cdt-dev-bounces@xxxxxxxxxxx] on behalf of Marc Dumais [marc.dumais@xxxxxxxxxxxx]
Sent: September 8, 2015 9:04 AM
To: cdt-dev@xxxxxxxxxxx
Subject: Re: [cdt-dev] Multi-core How configure GDB session programmatically ?

Hi Christelle,

Have you tried this:

https://wiki.eclipse.org/CDT/User/FAQ#How_do_I_use_multi-process_debugging.3F

Regards,

Marc

On 09/08/2015 08:03 AM, Christelle BURGUERA wrote:

Hi Doug,

 

Yes it‘s totally what I want to do.

 

What I think to do :

We have now our own project type (based on ansi c project), when the user select a multi-core board under the wizard, I’ll generated (programmatically.. always ;) ) 2 debug configurations which generate 2 binaries :

 

I’ll add widgets (text area and browse button) under launch configuration to add another binary file on Main tab.

 

So, the question that remains unresolved, it’s how launch the debug session ?

Should I launch 2 different debug sessions ?

 

Thank you !

Christelle

 

From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Doug Schaefer
Sent: Monday, September 07, 2015 8:13 PM
To: CDT General developers list.
Subject: Re: [cdt-dev] Multi-core How configure GDB session programmatically ?

 

This came up in a conversation I had with a field expert last week. Having multiple binaries/executables per project from what I’m told is pretty common and something we need to support better.

 

There is the Launch Group launch configuration type which is supposed to be able to co-ordinate multiple launches in one. This is probably what you’re looking for.

 

I also have on the drawing board, a multi-launch capability for the launch bar that lets you specify a list of triples (mode, config, target).

 

I’d like to explore the right way to do this. At the very least, we should never assume one binary per project and need to treat binaries as more of a first class citizen.

 

Thanks for bringing this up and hope that helps.

Doug.

 

From: <cdt-dev-bounces@xxxxxxxxxxx> on behalf of Christelle BURGUERA <Christelle.BURGUERA@xxxxxx>
Reply-To: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
Date: Monday, September 7, 2015 at 4:44 AM
To: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
Subject: Re: [cdt-dev] Multi-core How configure GDB session programmatically ?

 

Hi Marc,

 

Thank you to answer me !

 

In fact I’ve two different binaries, but one project (I want to add a new wizard for a new project type who will generate two debug configuration). The source will be instrumented and the makefile will be differents.

I want to add programmatically a section under the launch configuration to add the two binaries and launch a debug session, so yes I want to trigger a Debug session programmatically.

 

So, I want to know, if I have to do 2 debug sessions or if exists a kind of “double” debug session ?

 

I hop, I’m clear !

 

Many thanks !

Have a good day !

Christelle

 

From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Marc Khouzam
Sent: Friday, September 04, 2015 4:07 PM
To: CDT General developers list.
Subject: Re: [cdt-dev] Multi-core How configure GDB session programmatically ?

 

Hi Christelle,

I am not sure what you are asking exactly.

A binary running on a multi-core system is handled automatically by the OS, and a single Debug session should work fine.

If you are talking about debugging multiple processes, that is also supported by a single Debug session.

If you want to trigger a Debug session programatically, that can be done easily and I can point you to an example
of how Trace Compass does this to visualizer GDB traces.

I'll let you clarify your questions before getting into more details.

marc


From:cdt-dev-bounces@xxxxxxxxxxx [cdt-dev-bounces@xxxxxxxxxxx] on behalf of Christelle BURGUERA [Christelle.BURGUERA@xxxxxx]
Sent: September 4, 2015 8:47 AM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] Multi-core How configure GDB session programmatically ?

Hi all !

 

I’ll work on multi-core problematical very soon.

And I think about how can I’ll do …

 

How can you launch the debug ?

2 GDB sessions or one particular GDB session if exists such a think ???

Do you know where can I find a piece of code explaining to me ?

 

Many thanks for your attention !

Chris



_______________________________________________
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