Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Eclipse cdt debugging an executable within a shell script
Eclipse cdt debugging an executable within a shell script [message #896341] Wed, 18 July 2012 02:56 Go to next message
Eclipse UserFriend
I recently started using Eclipse CDT on Linux and like it a lot!!!

I am able to find an answer to almost everything.

I am unable to invoke debugger on a simple executable and I need to do it after running a quite big shell script which sets many environment variables.

My question is simply how to do it, so that eventually, I'll be able to invoke the debugger (GDB) where all environment variables are set by some pre-running shell script.

Alternatively, how do setup a script which - as first stage - sets up the environment, and eventually invokes the Eclipse CDT debugger.

Your assistance is much appreciated.

Regards, -Zvika
Re: Eclipse cdt debugging an executable within a shell script [message #896372 is a reply to message #896341] Wed, 18 July 2012 04:24 Go to previous messageGo to next message
Eclipse UserFriend
You have two possibilities.
1) Adapt your Debug Launch Configuration so it has all the environment variables you need and then start your executable directly
2) Adapt your Debug Launch Configuration so that it calls your shell script.
Here is an example for KDE and konsole:
- Set C/C++ application to "/usr/bin/konsole"
- as argument use
-e "bash -c \"./myshellscript.sh; exec bash\""

(the quotes are important!)
Re: Eclipse cdt debugging an executable within a shell script [message #897381 is a reply to message #896372] Mon, 23 July 2012 16:49 Go to previous messageGo to next message
Eclipse UserFriend
Hi Axel,

I tried to follow your receipt, and was kind of stuck. Eventually, I was able to do something along your lines which was good enough for me. I'll have to explore more to make this working stable enough.

Thanks for your advice.

-Zvika
Re: Eclipse cdt debugging an executable within a shell script [message #1768211 is a reply to message #897381] Fri, 14 July 2017 13:30 Go to previous message
Eclipse UserFriend
what final solution you adopted?
I'm stuck with the same problem.
Previous Topic:Cross GCC
Next Topic:indexer doesn't track active configuration for #ifdefs
Goto Forum:
  


Current Time: Sat Mar 15 11:09:25 EDT 2025

Powered by FUDForum. Page generated in 0.03240 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top