This is the mail archive of the
rda@sources.redhat.com
mailing list for the rda project.
RFA: check for error result from gdbsocket_startup.
- From: Jim Blandy <jimb at redhat dot com>
- To: rda at sources dot redhat dot com
- Date: 07 Oct 2004 11:10:20 -0500
- Subject: RFA: check for error result from gdbsocket_startup.
rda/unix/ChangeLog:
2004-10-07 Jim Blandy <jimb@redhat.com>
* server.c (main): Check for an error return from
gdbsocket_startup.
Index: rda/unix/server.c
===================================================================
RCS file: /cvs/src/src/rda/unix/server.c,v
retrieving revision 1.7
diff -c -p -r1.7 server.c
*** rda/unix/server.c 20 Jul 2004 00:42:45 -0000 1.7
--- rda/unix/server.c 7 Oct 2004 16:03:08 -0000
*************** main (int argc, char **argv)
*** 389,395 ****
if (portno != 0)
{
! gdbsocket_startup (portno, gdbserver.attach, process);
if (process->debug_informational)
fprintf (stderr, "Started listening socket on port %d.\n", portno);
}
--- 389,400 ----
if (portno != 0)
{
! if (gdbsocket_startup (portno, gdbserver.attach, process) < 0)
! {
! fprintf (stderr, "Error listening on port %d: %s\n",
! portno, strerror (errno));
! return 2;
! }
if (process->debug_informational)
fprintf (stderr, "Started listening socket on port %d.\n", portno);
}