Debugger exits: No executable specified, use 'target exec'

CodeLite installation/troubleshooting forum
paulkinzelman
CodeLite Enthusiast
Posts: 15
Joined: Sun Aug 29, 2010 12:53 am
Genuine User: Yes
IDE Question: C++
Contact:

Debugger exits: No executable specified, use 'target exec'

Post by paulkinzelman »

I'm using CodeLite V2.9.0.4684 on VistaSP2 with one workspace and two projects, a DLL and a console app that uses the DLL called in as a library.

I can compile the DLL and the console app, and I get a .EXE file that I can run in a DOS window. However, when I try to run it under CodeLite to debug it, I get in the debugger window:
Using gdbinit file: C:\Users\paulkinz\AppData\Local\Temp\codelite_gdbinit.txt
Current working dir: C:\apk\adev\gadll
Launching gdb from : ./Debug
Starting debugger : gdb --command="C:\Users\paulkinz\AppData\Local\Temp\codelite_gdbinit.txt" --interpreter=mi ""
DEBUG>>set new-console on
DEBUG>>set unwindonsignal on
DEBUG>>set width 0
DEBUG>>set height 0
DEBUG>>set print pretty on
DEBUG>>set print elements 200
Debug session started successfully!
DEBUG>>00000028-exec-arguments
DEBUG>>00000029-exec-run
DEBUG>>~"GNU gdb (GDB) 7.0\n"
GNU gdb (GDB) 7.0
DEBUG>>~"Copyright (C) 2009 Free Software Foundation, Inc.\n"
Copyright (C) 2009 Free Software Foundation, Inc.
DEBUG>>~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n"
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.\n"
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\"\n"
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
DEBUG>>~"and \"show warranty\" for details.\n"
and "show warranty" for details.
DEBUG>>~"This GDB was configured as \"mingw32\".\n"
This GDB was configured as "mingw32".
DEBUG>>~"For bug reporting instructions, please see:\n"
For bug reporting instructions, please see:
DEBUG>>~"<http://www.gnu.org/software/gdb/bugs/>...\n"
<http://www.gnu.org/software/gdb/bugs/>...
DEBUG>>&": No such file or directory.\n" <-------------------- this is probably where the problem is
DEBUG>>&"set new-console on\n"
DEBUG>>^done
DEBUG>>&"set unwindonsignal on\n"
DEBUG>>^done
DEBUG>>&"set width 0\n"
DEBUG>>^done
DEBUG>>&"set height 0\n"
DEBUG>>^done
DEBUG>>&"set print pretty on\n"
DEBUG>>^done
DEBUG>>&"set print elements 200\n"
DEBUG>>^done
DEBUG>>00000028^done
DEBUG>>00000029^error,msg="No executable specified, use `target exec'."
DEBUG>>00000030-var-update "*"
DEBUG>>00000030^done,changelist=[]
Debug session ended
No executable specified, use `target exec'.

There's probably something simple that I don't have set up but I can't find it.

I also tried compiling all the sources together (no DLL) and I get the same error when I try to debug.
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Debugger exits: No executable specified, use 'target exec'

Post by eranif »

Starting debugger : gdb --command="C:\Users\paulkinz\AppData\Local\Temp\codelite_gdbinit.txt" --interpreter=mi ""
Note the "" at the end, this means that there is no executable to debug...

Open the project settings | General

and make sure that you have executable specified in the "Program to Debug / Run" section

Eran
Make sure you have read the HOW TO POST thread
paulkinzelman
CodeLite Enthusiast
Posts: 15
Joined: Sun Aug 29, 2010 12:53 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Debugger exits: No executable specified, use 'target exec'

Post by paulkinzelman »

I left everything the default:
Program: ./$(ProjectName)
Working Folder: $(IntermediateDirectory)
Program Arguments: <blank>
Use separate debug arguments <unchecked>

In fact, I compared this section to the section in the Workspace that does work and those entries are identical. And the one that doesn't work actually does create an executable file that I can run from a DOS prompt.

But you're right, that line shows null for the executable, and the one that works shows an object there. So I have something corrupted wherever that line gets the executable from. If you don't have any specific ideas to look for, I guess I'll just create a new workspace/projects and see if that fixes it. But it might be nice to know how/where that got corrupted so I'll wait until I hear back from you.

BTW, when I hover over "Use separate debug arguments" you've got a typo: "speicified"
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Debugger exits: No executable specified, use 'target exec'

Post by eranif »

paulkinzelman wrote:I left everything the default:
Program: ./$(ProjectName)
Working Folder: $(IntermediateDirectory)
Program Arguments: <blank>
Use separate debug arguments <unchecked>
The question is whether or not you left the 'Output File' to use the default.

From the gdb log, I assume that this project is a DLL project?

If this is the case, then you should specified an executable to debug and not the DLL. Can you try and set an executable without codelite's macro (use the [...] button to select an executable)

In addition, can you please attach here the .project file so I could look into it and see what went wrong?

Eran
Make sure you have read the HOW TO POST thread
paulkinzelman
CodeLite Enthusiast
Posts: 15
Joined: Sun Aug 29, 2010 12:53 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Debugger exits: No executable specified, use 'target exec'

Post by paulkinzelman »

Well, that's strange. I'm doing today exactly what I did the other day when I was having the problem and today the gdb line you noted does not have a null file in it and it's working properly. Sorry for the intrusion. Feel free to delete this entire thread because at this point it appears that it must have been operator-error though I have no idea what.

The workspace had a DLL project and a top-level console app project. I even changed it to be a single project to compile everything into one top level console app and that didn't help. I understand that the DLL won't run standalone. Oh well...
paulkinzelman
CodeLite Enthusiast
Posts: 15
Joined: Sun Aug 29, 2010 12:53 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Debugger exits: No executable specified, use 'target exec'

Post by paulkinzelman »

I just today ran into this same problem again when I tried to create a new workspace so I thought I'd post what I found in case others stumble over the same problem.

The project was simple, just one console executable workspace and one DLL workspace used by the other one.

By looking into the .project file, I think what I did was to create the DLL workspace as a second executable instead of a DLL. In 'settings', the Project Type was "Executable" instead of Dynamic Library. And that screwed things up.
Post Reply