Menu

#463 Incorrect debugger being used in project

Undefined
invalid
Bug_Report
2017-01-10
2017-01-09
fruitCoders
No

I am using codeblocks 16.01 rev 10702 in Windows 7
SDK version 1.29.0
Build: Jan 25 2016, 21:19:34 - wx2.8.12 (Windows, unicode) - 32 bit

I use cmake as a build tool to generate make files for my project as well as a codeblocks project file.

Problem:

I have several deliverables for my project among them are 32bit and 64bit DLL's. To debug these I configure codeblocks to have 2 debuggers for gdb32 and gdb64 as I describe below. If I select the 64bit debugger from my configuration it still uses the 32bit debugger. To solve this I have to delete my 32bit debugger configuration :-(

Steps to reproduce: (valid with any C/C++ project):

got to menu settings->debugger
click "GDB/CDB debugger" once
click the "Create Config" button
Create new config named "W64_debugger" (I already have one called "W32_debugger"
Adjust "execution path" of the newly created config to "C:\TDM-GCC-64\5.1.0.3\bin\gdb64.exe" or whatever your path is

now go to menu setting->compiler
selected compiler is the default one "GNU GCC Compiler"
go to the tab "Toolchain executables"
Change the debugger from "GDB/CDB debugger: W32_debugger" to "GDB/CDB debugger: W64_debugger" (the once just created)
press OK to leave this dialog

make sure you project uses the compiler "GNU GCC Compiler" (right-click the top of your project tree in the "management" pane on the far left and choose "Build options", check "Selected compiler" combo-box on the upper right)

Make sure your project is set to "debug" and not "release"
Now press F8 to debug your project
Observe the "Debugger" output tab in the "Log & others" pane below -> observe it still uses the W32 gdb
Expected here the W64 gdb

Side note: I use a python test script as an integration test to test my C++ code (using a simulator), the output is also confusing to me as it does not display all my parameters (arguments) that I have set in menu "Project->Set programs' arguments..."
It displays this:
Starting debugger: C:\TDM-GCC-64\5.1.0.3\bin\gdb32.exe -nx -fullname -quiet -args python.exe
expecting this:
Starting debugger: C:\TDM-GCC-64\5.1.0.3\bin\gdb32.exe -nx -fullname -quiet -args python.exe runrobottest.py 06-tests\01-EMSIntegration\puttest.robot

"Debugger" output tab content:

Active debugger config: GDB/CDB debugger:W32_debugger
Building to ensure sources are up-to-date
Selecting target:
cu_platform_simulator
Adding source dir: C:\Sources\A040-CU_CMS_2.0\02-Firmware\build\simulator_build_debug\ Adding source dir: C:\Sources\A040-CU_CMS_2.0\02-Firmware\ Adding file: python.exe
Changing directory to: C:/Sources/A040-CU_CMS_2.0/02-Firmware/05-Test/02-IntegrationTests
Set variable: PATH=.;C:\TDM-GCC-64\5.1.0.3\bin;C:\TDM-GCC-64\5.1.0.3;C:\Program Files (x86)\MKS\Toolkit\mksnt;C:\Program Files (x86)\MKS\IntegrityClient\bin;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\ProgramData\Oracle\Java\javapath;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32;C:\Program Files\7-Zip;C:\MinGW\msys\bin;C:\Program Files (x86)\MSBuild\14.0\Bin\amd64;C:\Program Files (x86)\SciTools\bin\pc-win64;C:\Program Files (x86)\doxygen\bin;C:\Programs\Unxutils\usr\local\wbin;C:\Programs\ctags58;C:\Programs\Python34_w32;C:\Programs\Python34_w32\Scripts;C:\Program Files (x86)\CMake\bin;C:\Program Files (x86)\Atlassian\SourceTree
Starting debugger: C:\TDM-GCC-64\5.1.0.3\bin*gdb32.exe* -nx -fullname -quiet -args python.exe
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Reading symbols from python.exe...(no debugging symbols found)...done.
Debugger name and version: GNU gdb (GDB) 7.9.1
Child process PID: 4604
At C:\Sources\A040-CU_CMS_2.0\02-Firmware\10-Simulation\01-Simulator\src\w32sim.cpp:255
Debugger finished with status 0

Discussion

  • Teodor Petrov

    Teodor Petrov - 2017-01-09

    What is the setting of Debug -> Active debuggers? Is it set to target's default?

     
  • fruitCoders

    fruitCoders - 2017-01-10

    Arf... it was set to "GDB/CDB Debugger: W32_debugger", so I conclude this setting overrules the setting I did in the Setting->compiler menu.
    Thanks!

     
  • fruitCoders

    fruitCoders - 2017-01-10

    This ticket can be closed

     
  • Teodor Petrov

    Teodor Petrov - 2017-01-10
    • status: open --> invalid
    • assigned_to: Teodor Petrov
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.