Some help with launch configurations

Kishore kitts.mailinglists at gmail.com
Fri Jul 10 11:14:04 UTC 2009


On Friday 10 Jul 2009 4:10:17 pm Andreas Pakulat wrote:
> On 10.07.09 15:43:36, Kishore wrote:
> > On Friday 10 Jul 2009 1:38:03 pm Vladimir Prus wrote:
> > > On Friday 10 July 2009 Kishore wrote:
> > > I am not exactly sure about dialog -- that
> > > combo appears to only select what settings you want to edit -- it does
> > > not change how the launch configuration is launched -- you pick the
> > > relevant item from the menu. However, it's a bit confusing to myself,
> > > too. Andreas, can you clarify what this combobox is supposed to mean?
> >
> > If the combobox in the dialog is meant to "create" the tab below it.
> > would it not be better to have them as tabs that always exist and just
> > discard the "Launch Mode" combobox?
>
> Well, IMHO its not so nice to have 8 tabs there just because there are 8
> possible launch modes. And eventually even more if there are more launchers
> for a given launchmode (think of integrating gdb+msvc-debug on win32 for
> Debugging native apps). Thats why the tabs are added/removed based on the
> launchmode.

Hmmm... Too many tabs is not very nice but it does seem more intuitive. The 
first impression i got with the current method was that i can choose one or 
the other. I thought Debug and Execute modes were mutually exclusive. Combo 
boxes do have that effect of "one of many" choice. I take this as "the way it 
is meant to be" for launchers. i.e. you cannot have GDB and another configured 
in the same launch config. I am not sure about this last bit but i see no way 
to allowing the user to choose the different debug launches from the menu. Are 
there going to be submenus to the Debug action?

> > Also, from your comments its seems to be that the number of items that
> > are displayed in this combo box are also the items that appear in the
> > menu. And the various possibilities are based on the plugins that are
> > currently loaded. right?
>
> Right, a plugin can register custom launch modes, custom launchers and
> custom launch types with the framework. Additional launch modes will create
> new menu entries in the Run menu.
>
> > > > In my particular case, I do a lot of embedded systems and am
> > > > interested in maintaining two build folders. One for building the
> > > > application in for the x86 platform and another for the arm platform.
> > > >
> > > > When I run or debug my application that is built for arm, I need to
> > > > launch openocd which is a gdb server that connects to the arm device
> > > > over a JTAG interface. arm-gdb then connects to openocd. Later i want
> > > > openocd to exit as i stop debugging.
> > > >
> > > > Can i in some way achieve this with the launch configurations
> > > > workflow?
> > >
> > > It will require creating gdb/shell scripts and specifying that in
> > > debugger configuration. Say, gdb script might have:
> > >
> > > 	shell whatevercommand &
> > >     target remote <xxx>
> > >
> > > However, I don't think anobody tested this with KDevelop4, so you are
> > > on thin ice. Eventually, we'll have 'remove application' launch type
> > > that will make this easy.
> >
> > The one thing that i immediately noticed with the cmake support is that
> > it needs to provide the additional cmake configuration that is provided
> > by cmake- gui when creating the build folder. Perhaps, through an
> > "Advanced" button.
>
> Not sure what you mean with that. Opening a cmake project asks you already
> for the builddir for that project. If you have multiple builddirs you can
> configure them via Project->Project Configuration...->CMake and switch the
> active one there.

At least for embedded systems, there is more configuration needed for cmake. 
If you look through the official cmake-gui application, you will see that it 
offers more options. When cross compiling it allows you to set the compiler 
either directly or by specifying a CMAKE_TOOLCHAIN_FILE. At the very least i 
think that the cmake support should provide a line edit that the user can use 
to specify additional options to the cmake executable.
I tried looking through the code for this but could not find where the cmake 
executable is executed.

> I'm planning to have a more generic way of switching between build
> configurations for a project so that the switching can be put into a
> non-cmake-specific place in the GUI. But thats something for 4.1 probably.
>
> Andreas

-- 
Cheers!
Kishore




More information about the KDevelop-devel mailing list