Code::Blocks Forums

User forums => Embedded development => Topic started by: bigwcharly on May 11, 2014, 03:16:43 pm

Title: Debugger: execvp (...) failed with error 13!
Post by: bigwcharly on May 11, 2014, 03:16:43 pm
Hi all
I've successfully set up code blocks for cross-compilation but now I face problems trying to debug. Although I've set the debugger correctly to arm-unknown-linux-gnueabi-gdb, the command for debugging is not correctly formed, resulting in an error starting the debugger. The strange thing is that yesterday when I used code blocks for the first time, it did work (I managed to remotely debug my application).

The debugger log is pasted below:
Code
LD_LIBRARY_PATH=.:/home/developer/Development/svn/Libraries/debug:/home/developer/Development/svn/Source/Thirdparty/jsoncpp/lib:/home/developer/Development/svn/Source/Thirdparty/sqlite/lib:
Command-line: /home/developer/Development/svn/Tools/crosstools-ng/bin/bin -nx -fullname  -quiet -args ../../../Binaries/debug/Switch_Tests
Working dir : /home/developer/Development/svn/Source/Projects/Switch_Tests/
[b]execvp(/home/developer/Development/svn/Tools/crosstools-ng/bin/bin, -nx, -fullname, -quiet, -args, ../../../Binaries/debug/Switch_Tests) failed with error 13![/b]

From the log it seems that code blocks does not add the linux-unknown-arm-gnueabi-gdb to the command.
Probably I did something wrong, I'd really appreciate your help!
Title: Re: Debugger: execvp (...) failed with error 13!
Post by: bigwcharly on May 11, 2014, 03:45:25 pm
Okay, I've suddenly found the problem.
The compiler installation directory was set to "/home/developer/Development/svn/Tools/crosstools-ng/bin/bin".
This must be "/home/developer/Development/svn/Tools/crosstools-ng/bin" instead.
Strangely yesterday I've correctly set this directory, being the reason debugging worked.
Also strange is that code blocks still found the debugger, but just failed to form the correct commands. It wouldn't be bad if there was some error message if the toolchain executables are not in the bin sub directory of the path set in "Compiler's installation directory" ...

As I answered my own question, I hope this one helps others in the future.
Title: Re: Debugger: execvp (...) failed with error 13!
Post by: oBFusCATed on May 11, 2014, 05:16:35 pm
I'm not sure what version of C::B are you using, but the debugger in 12.11 and 13.12 doesn't use the compiler's toolchain paths anymore...
Title: Re: Debugger: execvp (...) failed with error 13!
Post by: bigwcharly on May 14, 2014, 02:57:04 pm
I'm running Ubuntu 12.04 which provides an older version of C::B.
I've upgraded C::B to the latest version now.