Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » execute shell command cause debugger terminated(execute system() always terminate CDT debugger)
execute shell command cause debugger terminated [message #1798235] Wed, 14 November 2018 15:08 Go to next message
tom chen is currently offline tom chenFriend
Messages: 1
Registered: November 2018
Junior Member
Hello,

I am using Eclipse Oxygen on Linux PC and gdbserver on a target board to do remote debugging of C++ program, all went well until I need to run shell command using std::system( ).

// myApp source code
. . . .
int main( )
{
. . . .
system("ls /tmp/");
. . . .
}
The main thread always terminates when executing system( ) and on remote side,
# ./gdbserver :10000 myApp
Process Ims created; pid = 10238
Listening on port 10000
Remote debugging from host 169.254.54.63
Detaching from process 10302

Other similar functions like C++11 async( ) has same result. I am wondering why?
Re: execute shell command cause debugger terminated [message #1798279 is a reply to message #1798235] Wed, 14 November 2018 19:58 Go to previous message
Tauno Voipio is currently offline Tauno VoipioFriend
Messages: 742
Registered: August 2014
Senior Member
system() is one of the library functions creating new process(es). The new processes are not anymore under control of the debug agent (gdbserver).

--

Tauno Voipio
Previous Topic:Adding a static (.a) library to existing makefile project
Next Topic:Perf Error
Goto Forum:
  


Current Time: Fri Apr 26 15:10:12 GMT 2024

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

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

Back to the top