Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Launch target types



From: <cdt-dev-bounces@xxxxxxxxxxx> on behalf of Jesper Eskilson <Jesper.Eskilson@xxxxxxx>
Reply-To: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
Date: Friday, January 20, 2017 at 3:41 AM
To: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
Subject: Re: [cdt-dev] Launch target types

Ok, so now I know a little so I can formulate my question a little clearer.


What I was wondering was if I need to create multiple target *types*, or if it works to create multiple ILaunchTarget objects having the same "type id", but different id:s. As far as I can tell it works fine to create multple targets of the same type, but having different id:s.


Yes, a launch descriptor can handle multiple launch target types. That usually results in different launch configurations that get created since each launch target type likely needs it’s own launch configuration type. And that’s OK. 

A Qt project, for example, can launch on your host or on a QNX target. Different target types. Different launch configuration types. But same launch descriptor.



I got confused by the fact that the launch target code sometimes refers to the id as the "user consumable name", leading me to think that the name was purely a presentation thing and not an ID, but the name of the target seems to actually be the id. Maybe this code was written before there were any label providers controlling the presentation of a target?


getName() is marked deprecated and states it’s the same as the id. And, yes, I think that’s the history of how this came about. The label provider calculates the text for the UI.


/Jesper​



From: cdt-dev-bounces@xxxxxxxxxxx <cdt-dev-bounces@xxxxxxxxxxx> on behalf of Doug Schaefer <dschaefer@xxxxxxxxxxxxxx>
Sent: Thursday, January 19, 2017 8:00 PM
To: CDT General developers list.
Subject: Re: [cdt-dev] Launch target types
 

From: <cdt-dev-bounces@xxxxxxxxxxx> on behalf of Jesper Eskilson <Jesper.Eskilson@xxxxxxx>
Reply-To: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
Date: Thursday, January 19, 2017 at 7:49 AM
To: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
Subject: [cdt-dev] Launch target types

Hi,


I'm trying to add support for the launchbar in our toolchain and have a question about how launch targets work.


We have our own debugger infrastructure (i.e. not gdb), which supports a number of so-called debugger drivers. A debugger driver in this context can something like our built-in simulator, or some form of external probe connected via USB (e.g. J-LINK). The debugger driver is specified as a parameter to our external debugger, and I was planning to let a launch-target map to a debugger driver, since it becomes natural to think of a launch as "debug project X on J-LINK". 


So, my question is, do I create one launch target type per driver, or do I let my implementation of ILaunchTargetProvider create multiple ILaunchTargets having the same ID? I guess another way to put it is: "is each launch target expected to have a unique ID?"


Yes, the launch targets need unique IDs. We use them to know which target is active on startup. And I think I missed the point why you would multiple targets to have the same id.

Anything can be a target. For a given thing you are launching and a given launch mode, if the user has a choice of what else to use to launch, then it should probably be a separate target for each choice so they show up in the target selector and the user can choose between them.

Of course, that leads to the case where a given device might have multiple paths, which is probably wise not to think of those devices as targets, but each of those paths are a target. Which probably means target is the wrong term to use, but couldn’t think of a better one, though “connection” was once a term I used.

HTH,
Doug.


I hope I'm making myself clear here. 


/Jesper




Back to the top