Skip to content

Commit

Permalink
Print to stderr to notify gdb when listening
Browse files Browse the repository at this point in the history
  • Loading branch information
fjricci committed May 20, 2016
1 parent e1d9f77 commit 20e3132
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Sources/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 68,11 @@ Socket *CreateSocket(std::string const &host, std::string const &port,
DS2LOG(Fatal, "cannot listen on [%s:%s]: %s", host.c_str(), port.c_str(),
socket->error().c_str());
} else {
// This print to stderr is required when gdb launches ds2
if (gGDBCompat) {
fprintf(stderr, "Listening on port %s\n", socket->port().c_str());
}

DS2LOG(Info, "listening on [%s:%s]", socket->address().c_str(),
socket->port().c_str());
}
Expand Down

0 comments on commit 20e3132

Please sign in to comment.