Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Problem of debugging a program inside another c++ program(Problem of debugging a program inside another c++ program)
Problem of debugging a program inside another c++ program [message #1768904] Mon, 24 July 2017 14:58 Go to next message
Eclipse UserFriend
Hi all,

I have a c++ program in NS3 called "sctpNetworkExample" which has network configuration (connection of server and client ) and also I have an application layer program which executes in sctpNetworkExample (as dce) which is called "sctpApproach" (it opens sessions, send and receive packets).
When I open and debug sctpNetworkExample, it debugs line by line till the line that sctpApproach should execute, then sctpApproach runs without I can trace it. I mean it runs but there is not any control in the debugger for it. I wish to debug the other one also.
I would greatly appreciate if you can guide me.
Thanks in advance
Re: Problem of debugging a program inside another c++ program [message #1768959 is a reply to message #1768904] Tue, 25 July 2017 04:24 Go to previous messageGo to next message
Eclipse UserFriend
Not sure I 100% follow. But if I have understood correctly you want to debug forked programs?

If so, have a look at https://sourceware.org/gdb/onlinedocs/gdb/Forks.html for a starting point.
Re: Problem of debugging a program inside another c++ program [message #1769025 is a reply to message #1768959] Tue, 25 July 2017 16:05 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for your guide.
What i got of your suggested page was the setting for gdb to solve the problem. Now my question is that, could I do these settings for gdb in Eclipse? I see that there is a debugger tab in debug configuration or options for gdb in preferences but it seems my required setting has to be done somewhere else of Eclipse).Could you please guide me?
Re: Problem of debugging a program inside another c++ program [message #1769068 is a reply to message #1769025] Wed, 26 July 2017 04:46 Go to previous message
Eclipse UserFriend
Create a gdbinit file that contains any extra commands you want to issue to GDB and in the Launch configuration point at that file.

Remember that some settings may cause GDB and Eclipse to not communicate as expected, so some experimentation will be needed.

If you have a good combination of commands that suits your needs, and it is likely to be generally useful, we can add those commands to default CDT, perhaps with just a check-box in the Launch configuration. If so, please file an enhancement request: https://bugs.eclipse.org/bugs/enter_bug.cgi?product=CDT
Previous Topic:Well this has all gone horribly wrong,...
Next Topic:Running C++ sample "hello world".
Goto Forum:
  


Current Time: Wed Mar 19 03:20:53 EDT 2025

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

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

Back to the top