summaryrefslogtreecommitdiff
path: root/gdb/gdbserver/remote-utils.c
diff options
context:
space:
mode:
authorMichal Ludvig <mludvig@suse.cz>2002-03-13 20:42:16 +0000
committerMichal Ludvig <mludvig@suse.cz>2002-03-13 20:42:16 +0000
commitb42a8efee9faa41f40acaa1248bd655a2cf2d4b3 (patch)
tree1a7c9a640ae6c3aa9090e53e69967368283faffe /gdb/gdbserver/remote-utils.c
parentcb2544478feaf95e9371f9cdb4438d7bc7945cd9 (diff)
downloadgdb-b42a8efee9faa41f40acaa1248bd655a2cf2d4b3.tar.gz
* gdbserver/remote-util.c (remote_open): Print remote-side's
IP address when remote debugging over the network.
Diffstat (limited to 'gdb/gdbserver/remote-utils.c')
-rw-r--r--gdb/gdbserver/remote-utils.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c
index ff1718fc089..d9213af8d64 100644
--- a/gdb/gdbserver/remote-utils.c
+++ b/gdb/gdbserver/remote-utils.c
@@ -48,7 +48,7 @@ void
remote_open (char *name)
{
int save_fcntl_flags;
-
+
if (!strchr (name, ':'))
{
remote_desc = open (name, O_RDWR);
@@ -99,7 +99,7 @@ remote_open (char *name)
}
#endif
-
+ fprintf (stderr, "Remote debugging using %s\n", name);
}
else
{
@@ -154,6 +154,10 @@ remote_open (char *name)
signal (SIGPIPE, SIG_IGN); /* If we don't do this, then gdbserver simply
exits when the remote side dies. */
+
+ /* Convert IP address to string. */
+ fprintf (stderr, "Remote debugging from host %s\n",
+ inet_ntoa (sockaddr.sin_addr));
}
#if defined(F_SETFL) && defined (FASYNC)
@@ -164,7 +168,6 @@ remote_open (char *name)
#endif
#endif
disable_async_io ();
- fprintf (stderr, "Remote debugging using %s\n", name);
}
void