User forums > Help

Debugger doesn't work

<< < (2/4) > >>

pocoloco:

--- Quote from: BlueHazzard on May 12, 2022, 09:56:55 am ---Can you enable full debug logging in "Settings->Debugger->Common->full debug log" and post the debug log again here?

ps. thank you for posting the log from the beginning :)

--- End quote ---


--- Code: ---Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\sample\
Adding source dir: C:\sample\
Adding file: C:\sample\bin\Debug\sample.exe
Changing directory to: C:/sample/.
Set variable: PATH=.;C:\CodeBlocks32\CodeBlocks\MinGW\bin;C:\CodeBlocks32\CodeBlocks\MinGW;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Python27;C:\Python27\Scripts;C:\Program Files\Python39\Scripts;C:\Program Files\Python39;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Git\cmd;C:\Program Files (x86)\GitExtensions;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\PuTTY;C:\Program Files (x86)\nodejs;C:\Program Files (x86)\Bitvise SSH Client;C:\Users\Pouria\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\Nmap;D:\Program Files\_bin\UnixUtils;D:\Program Files\_bin;D:\Program Files\_bin\aliases;C:\Users\Pouria\AppData\Local\Programs\Fiddler;C:\Users\Pouria\AppData\Roaming\npm;D:\Program Files\hashcat-6.1.1;D:\Program Files\ffmpeg-4.3.1-win32-shared\bin;D:\Program Files\ImageMagick-7.0.10;D:\wamp\bin\php\php7.2.4;D:\Personal Folder\Pouria\My Documents\_0NirLauncher\SysInternals;D:\Program Files\Arduino-cli;C:\Program Files (x86)\GnuWin32\bin

[debug]Command-line: C:\Program Files\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname -quiet  -args C:/sample/bin/Debug/sample.exe
[debug]Working dir : C:\sample

Starting debugger: C:\Program Files\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname -quiet  -args C:/sample/bin/Debug/sample.exe
done

[debug]> set prompt >>>>>>cb_gdb:

Setting breakpoints

[debug]Reading symbols from C:/sample/bin/Debug/sample.exe...done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 8.1
[debug]Copyright (C) 2018 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "x86_64-w64-mingw32".
[debug]Type "show configuration" for configuration details.
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]Find the GDB manual and other documentation resources online at:
[debug]<http://www.gnu.org/software/gdb/documentation/>.
[debug]For help, type "help".
[debug]Type "apropos word" to search for commands related to "word".
[debug]>>>>>>cb_gdb:
[debug]> set confirm off

Debugger name and version: GNU gdb (GDB) 8.1

[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 200
[debug]>>>>>>cb_gdb:
[debug]> set new-console on
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> target exec
[debug]No executable file now.
[debug]>>>>>>cb_gdb:
[debug]> directory C:/sample/
[debug]Source directories searched: C:/sample;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]No executable specified, use `target exec'.
[debug]Starting program: 
[debug]>>>>>>cb_gdb:

Starting the debuggee failed: No executable specified, use `target exec'.

[debug]> quit

Debugger finished with status 0

--- End code ---


--- Quote ---Also, have you seen this: https://stackoverflow.com/questions/67045842/how-do-you-debug-using-codeblocks-20-03-the-mingw-version ?
--- End quote ---
I have but I did not have a prior mingw installation.
But just to be sure I downloaded mingw64 and used the gdb.exe that came with it, but it also gave me the same error.
I even found a gdb.exe with version 10 somehow, but that also gave me the same error.

BlueHazzard:
From all what i have read this seems really to be some miss match between 32bit and 64bit or different compiler debugger combinations.
The execution command line for the debugger is right, so we have to check every setting of paths...

Close all running codeblocks
1) we fix the paths:
1.1) Open the environment variables editor:
1.2) Open a cmd line by hitting start menu and typing "cmd"
1.3) in the black window paste "rundll32 sysdm.cpl,EditEnvironmentVariables" and hit enter
1.4) in the opening dialog Search in the top and bottom field for the "PATH" variable and edit it
1.5) remove all paths that are related with codeblocks or mingw (for example "C:\CodeBlocks32\CodeBlocks\MinGW\bin" and "C:\CodeBlocks32\CodeBlocks\MinGW" )
1.6) Save and close dialog
2) Fix Codeblocks
2.1) Open codeblocks
2.2) Settings->Compiler->Global compiler settings->Selected compiler:"GNU GCC compiler"->Toolchain executables (from the tabs)->Check compiler installation directory
2.3) Fix debugger: Settings->Debugger->Default->Executable path, make sure it is the same as in 2.2
3) Recompile your application
3.1) Build->Rebuild
4) Start the debugger
4.1) Retry with Debug->Start/continue

pocoloco:

--- Quote from: BlueHazzard on May 12, 2022, 11:17:44 am ---From all what i have read this seems really to be some miss match between 32bit and 64bit or different compiler debugger combinations.
The execution command line for the debugger is right, so we have to check every setting of paths...

Close all running codeblocks
1) we fix the paths:
1.1) Open the environment variables editor:
1.2) Open a cmd line by hitting start menu and typing "cmd"
1.3) in the black window paste "rundll32 sysdm.cpl,EditEnvironmentVariables" and hit enter
1.4) in the opening dialog Search in the top and bottom field for the "PATH" variable and edit it
1.5) remove all paths that are related with codeblocks or mingw (for example "C:\CodeBlocks32\CodeBlocks\MinGW\bin" and "C:\CodeBlocks32\CodeBlocks\MinGW" )
1.6) Save and close dialog
2) Fix Codeblocks
2.1) Open codeblocks
2.2) Settings->Compiler->Global compiler settings->Selected compiler:"GNU GCC compiler"->Toolchain executables (from the tabs)->Check compiler installation directory
2.3) Fix debugger: Settings->Debugger->Default->Executable path, make sure it is the same as in 2.2
3) Recompile your application
3.1) Build->Rebuild
4) Start the debugger
4.1) Retry with Debug->Start/continue

--- End quote ---

Thank you for your answer.
I did all of that but unfortunately I am getting the same error as before.

AndrewCot:
GDB 8.1 is known to have issues. Please update to a later version.

pocoloco:

--- Quote from: AndrewCot on May 12, 2022, 12:21:40 pm ---GDB 8.1 is known to have issues. Please update to a later version.

--- End quote ---

It appears to be the latest version: https://sourceforge.net/projects/mingw-w64/files/mingw-w64/
Where do I get a newer one?

(I did try with a v10.1 one I found here but that gave me the same error as well).

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version