Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: Napoleon on October 01, 2014, 09:14:18 am

Title: Tutorial how to control GDB from an external process (similar how C::B does it)
Post by: Napoleon on October 01, 2014, 09:14:18 am
I have a project at Uni I've been asked to do where I need to launch GDB send commands to it from a controlling program.  GDB will, in turn, be used to debug another process.  In essences, pretty much how C::B operates GDB.
Would anyone be able to share a link to some information or tutorials on how this can be done?

The controlling process is written in Obj-C ++ and runs on both OSX and Ubuntu.  I'm planning to work on it in Ubuntu using C::B.
The process that GDB will debug is written in C++.

Cheers,
Nap
Title: Re: Tutorial how to control GDB from an external process (similar how C::B does it)
Post by: ollydbg on October 01, 2014, 09:50:26 am
Communicate gdb through command line pipe.
Also I suggest you use the gdb's MI interface.
Title: Re: Tutorial how to control GDB from an external process (similar how C::B does it)
Post by: oBFusCATed on October 01, 2014, 09:11:32 pm
Another option as far as I know is to use the python api, but this is not a place where you'll receive enough up to date information.
It is best to ask your question on the gdb mailing list, there you'll find more knowledgeable people about this matter.
Title: Re: Tutorial how to control GDB from an external process (similar how C::B does it)
Post by: Napoleon on October 05, 2014, 08:18:35 am
Thanks for the hints.