From 50278d599da5f7536a1243a887c2a5fa12e099c1 Mon Sep 17 00:00:00 2001 From: Gary Benson Date: Wed, 6 Aug 2014 13:47:55 +0100 Subject: [PATCH] Convert fatal to error in remote_prepare This commit converts a call to fatal in remote_prepare with a call to error. remote_prepare is called precisely once, from main, at a point where jumping to toplevel will call exit (1), so error and fatal are functionally equivalent at this point. Note that remote_prepare calls perror_with_name (which calls error) so callers of remote_prepare must already handle the fact that it may exit via longjmp. gdb/gdbserver/ChangeLog: * remote-utils.c (remote_prepare): Replace fatal with error. --- gdb/gdbserver/ChangeLog | 4 ++++ gdb/gdbserver/remote-utils.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index c3e4c935..dd89aab 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,5 +1,9 @@ 2014-08-28 Gary Benson + * remote-utils.c (remote_prepare): Replace fatal with error. + +2014-08-28 Gary Benson + * linux-low.c (linux_async): Replace fatal with warning. Tidy up and return. (linux_start_non_stop): Return -1 if linux_async failed. diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c index 327677a..81b9af3 100644 --- a/gdb/gdbserver/remote-utils.c +++ b/gdb/gdbserver/remote-utils.c @@ -247,7 +247,7 @@ remote_prepare (char *name) port = strtoul (port_str + 1, &port_end, 10); if (port_str[1] == '\0' || *port_end != '\0') - fatal ("Bad port argument: %s", name); + error ("Bad port argument: %s", name); #ifdef USE_WIN32API if (!winsock_initialized) -- 2.7.4