News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Running bash script before starting debugger

Started by 3sv, February 25, 2009, 09:57:02 AM

Previous topic - Next topic

3sv

Hello All,

I can successfully use remote debugging from within CodeBlocks. It works nice but now I have to copy the executable to the target outside C::B, and has to start the remote debugger also outside C::B. I want to automate these two tasks.

Therefore I want to use a bash script that runs every time I start a debug session. In the project/target options on the debugger tab there is an input field for Additional commands before connection. On the first sight it looks exactly like what i need, but on a second look it seems that this is made for gdb commands. It should be possible also to use the After connection gdb commands to copy the executable but then I still have to start the remote debugger by hand, and for starting the server I should already have the executable. Thus that would lead to a chicken and egg problem.

So I would prefer to just start a bash script. That script can copy the executable with scp , and then starts the remote debugger over ssh with public-key based authentication.

Any ideas? what is the most simple way to do this?

Thanks in advance.




mandrav

There's no support for pre/post debugging shell commands currently so the only solution would be to manually run the said shell script before debugging.

On the other hand, one could possibly write a plugin that listens to EVT_DEBUGGER_STARTED/EVT_DEBUGGER_FINISHED messages and add this functionality. But I haven't seen this part of the code in a while and I 'm not sure it would work out of the box or if it 'd take some fiddling first.
Be patient!
This bug will be fixed soon...

killerbot

as discussed I will try to add some initial support for this.