Author Topic: Project - compiler changes do not cause debugger to change  (Read 168 times)

Offline AndrewCot

  • Multiple posting newcomer
  • *
  • Posts: 26
On my PC I have Cygwin and MSYS2 (Mingw64), which I have both working with CB. I have created a options_msys2.xml for the MSYS2 migw64 and added it to the default.conf so I do not have to keep changing as the existing MSYS2 is for mingw32. This options and conf setup works in conjunction with multiple GDD configurations for the compilers as well, which is also in the default.conf.

I can use the one project file for both compilers and change the compiler in the Build Options, but when I swap between the two the GDB is not changed. The code does not reload the debugger on a compiler change.

Is this expected?

A work around is to change the compiler in the build options, save the project, close the project and then load it again.

Is the work around good enough or should the code be changed so that when you change compilers the debugger is also changed?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13323
    • Travis build status
Re: Project - compiler changes do not cause debugger to change
« Reply #1 on: Yesterday at 09:16:17 am »
The compiler can reference a debugger configuration.
And when you use Debug -> Active debugger -> Target's default this would be reflected correctly.
Or you can use this menu to select the debugger config you want to use.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline AndrewCot

  • Multiple posting newcomer
  • *
  • Posts: 26
Re: Project - compiler changes do not cause debugger to change
« Reply #2 on: Today at 07:17:24 am »
Sorry, looks like I may not have been clear on the question.

If I load a project and then change the build option compiler, should CB change the debugger to the "new" debugger configured in the selected compiler?

If I load a project that is already configured for the CYGWIN compiler/debugger and then change the compiler via the build options to Mingw then the  Debug->Active debugger menu option is set to Target's default , BUT it still runs the Cygwin GDB and not the Mingw GDB that the MingW compiler is configured to use. I have attached the a screen snippet of the debugger options I have setup.


BTW: I have the Cygwin compiler configuration setup to use a Cygwin debugger configuration and the Mingw64 compiler configuration setup to use a Mingw64 debugger. These work correctly so long as I do NOT change between the two compiler configurations via the project's build options after loading the project without performing the work around.


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13323
    • Travis build status
Re: Project - compiler changes do not cause debugger to change
« Reply #3 on: Today at 11:06:13 am »
Works fine for me at least on linux with the CB project.
I have two compilers which have different debugger's configurations selected (settings -> compiler -> [my compiler] -> toolchain executables -> debugger) and if I switch and then use debug -> start it print the correct configuration in the log.

What are the exact steps to reproduce this problem?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]