I have a makefile based project I would like to debug. when I attempt to do so I get the debug log below and the error "Starting the debuggee failed: No executable file specified.". The place were I would expect the program name to be is empty, there are no spaces in the file name (I gather this causes problems from other forum posts). The program runs exactly as expected when I just run it from code::block without debugging.
Could anyone explain what I might be doing wrong?
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
all
Adding source dir: /home/rcrozier/src/qucs_git_crobarcro/qucs-core/
Adding source dir: /home/rcrozier/src/qucs_git_crobarcro/qucs-core/
Adding file: /home/rcrozier/build/qucs_git_crobarcro/src/qucsator
Changing directory to: /home/rcrozier/src/qucs_git_crobarcro/qucs-core/.
Set variable: LD_LIBRARY_PATH=.:
[debug]Command-line: /usr/bin/gdb -nx -fullname -quiet -args /home/rcrozier/build/qucs_git_crobarcro/src/qucsator
[debug]Working dir : /home/rcrozier/src/qucs_git_crobarcro/qucs-core
Starting debugger: /usr/bin/gdb -nx -fullname -quiet -args /home/rcrozier/build/qucs_git_crobarcro/src/qucsator
done
[debug]"/home/rcrozier/build/qucs_git_crobarcro/src/qucsator": not in executable format: File format not recognised
[debug](gdb)
[debug]> set prompt >>>>>>cb_gdb:
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
[debug]>>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
[debug]Copyright (C) 2014 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-linux-gnu".
[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 (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.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 0
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor intel
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source /usr/share/codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory /home/rcrozier/src/qucs_git_crobarcro/qucs-core/
[debug]Source directories searched: /home/rcrozier/src/qucs_git_crobarcro/qucs-core:$cdir:$cwd
[debug]>>>>>>cb_gdb:
[debug]> set args -i ~/Documents/qucsator_hang_bug.net
[debug]>>>>>>cb_gdb:
[debug]> break "/home/rcrozier/src/qucs_git_crobarcro/qucs-core/src/components/tswitch.cpp:244"
[debug]No symbol table is loaded. Use the "file" command.
[debug]Breakpoint 2 ("/home/rcrozier/src/qucs_git_crobarcro/qucs-core/src/components/tswitch.cpp:244") pending.
[debug]>>>>>>cb_gdb:
[debug]> break "/home/rcrozier/src/qucs_git_crobarcro/qucs-core/src/ucs.cpp:78"
[debug]No symbol table is loaded. Use the "file" command.
[debug]Breakpoint 3 ("/home/rcrozier/src/qucs_git_crobarcro/qucs-core/src/ucs.cpp:78") pending.
[debug]>>>>>>cb_gdb:
[debug]Using terminal's PID as console PID 15375, TTY /dev/pts/5
[debug]> tty /dev/pts/5
[debug]Queued:[tty /dev/pts/5]
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]No executable file specified.
[debug]Use the "file" or "exec-file" command.
[debug]Starting program: -i ~/Documents/qucsator_hang_bug.net
[debug]>>>>>>cb_gdb:
Starting the debuggee failed: No executable file specified.
[debug]> quit
Debugger finished with status 0
For future googlers I can confirm this is the solution, I configured my project with
configure <blan blah> --prefix=/opt
After building did
Then changed Project->Properties->Build Targets->Output Filename to /opt/bin/<executeable name> (in my case /opt/bin/qucsator)
Debugging now works as expected.
Thanks for the help everyone.