Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-02

Debugger and Buildmodes / Project settings

5 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Ring

Hi!

I am wondering if there is a way to make the General Debugger Settings Project or Buildmode specific.

My problem is that I often switch between microcontrollers that need a different version of gdb. (e.g. arm-none-eabi-gdb for arm, mipsel-sde-elf-gdb for mipsel)
and that sometimes I can use JLink probe on their default port, sometimes I need to use openocd that runs on another port.

Right now this means that I have to manually adjust the path to gdb/other debugger settings when I switch from (for example) a mipsel project to a arm based project.

No big deal, but it would be much nicer to somehow override this setting when opening a new project.

Is there a way to do this?

Thank you,

Michael

Reply by email

Martin Frb
to Michael Ring
Michael Ring wrote 19 lines
Hi! I am wondering if there is a way to make the General Debugger Settings Project or Buildmode specific. My problem is that I often switch between microcontrollers that need a different version of gdb. (e.g. arm-none-eabi-gdb for arm, mipsel-sde-elf-gdb for mipsel) and that sometimes I can use JLink probe on their default port, sometimes I need to use openocd that runs on another port. Right now this means that I have to manually adjust the path to gdb/other debugger settings when I switch from (for example) a mipsel project to a arm based project. No big deal, but it would be much nicer to somehow override this setting when opening a new project. Is there a way to do this?

It does not yet exist. And unfortunately no immediate plan exists.

The long time idea is to have the global defaults, and then have per project settings (allowing to override all or selected settings) (but per buildmode would work too, or could be added as further level).

So if you want to sent a patch then this will be welcome.

I have not looked at the config stuff in a long while. So I can not add any hints right now.

----
there is a parallel "project/idea" that equally currently is without any near time plans. But that has tiny its of code.
TDebuggerOptions = class(TAbstractIDEEnvironmentOptions) in BaseDebuggerManager.

The idea is to move the debugger an d with it the config to a package of its own. Then it may not have direct access to the global/project options.

So ideally if options are stored in the project, then they are collected in one separate object, that then will be stored.
For that use TRttiXMLConfig it saves all published properties to the xml.

---

All else I would first have to have a deeper look myself.

Reply by email

Juha Manninen
to Martin Frb
Martin Frb wrote
The long time idea is to have the global defaults, and then have per project settings (allowing to override all or selected settings) (but per buildmode would work too, or could be added as further level).

Compiler options are all saved to build modes. There already are debugger specific compiler flags, adding a debugger exe path would be easy.
Would selection of the executable be enough?

There could also be selection for an external debugger configuration if it gets separated, but that is a big change all together.

Unit: ide/frames/compiler_debugging_options

Juha

Reply by email

Mattias Gaertner
to Juha Manninen
Show quoted text 9 lines
On Thu, Feb 5, 2015 at 3:55 PM, Martin Frb wrote: > The long time idea is to have the global defaults, and then have per project > settings (allowing to override all or selected settings) (but per buildmode > would work too, or could be added as further level). Compiler options are all saved to build modes. There already are debugger specific compiler flags, adding a debugger exe path would be easy. Would selection of the executable be enough?

Maybe for this a macro is enough. For example the debugger could use the IDE macro "GDBPath". If this is not set by the project use the default (Tools / Options).

There could also be selection for an external debugger configuration if it gets separated, but that is a big change all together. Unit: ide/frames/compiler_debugging_options

Mattias

Reply by email

Michael Ring
to Mattias Gaertner

There are a few more fields that change:

The overall Debugger type
The Debugger Path

Debugger_Remote_Port
Debugger_Remote_Hostname
Debugger_Startup_Options
SSH_Startup_Options

This would then cover the most important settings for ssh and gdbserver.

If this could work it would be a dream come true ;-)

I can try to prepare a patch myself if you point me to the right files/concepts to understand/change.

Michael

Mattias Gaertner wrote 29 lines
On Thu, 5 Feb 2015 17:22:50 +0200 Juha Manninen wrote: > On Thu, Feb 5, 2015 at 3:55 PM, Martin Frb wrote: >> The long time idea is to have the global defaults, and then have per project >> settings (allowing to override all or selected settings) (but per buildmode >> would work too, or could be added as further level). > Compiler options are all saved to build modes. There already are > debugger specific compiler flags, adding a debugger exe path would be > easy. > Would selection of the executable be enough? Maybe for this a macro is enough. For example the debugger could use the IDE macro "GDBPath". If this is not set by the project use the default (Tools / Options). > There could also be selection for an external debugger configuration > if it gets separated, but that is a big change all together. > > Unit: ide/frames/compiler_debugging_options Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email