Patchwork [obvious/pushed] Change order of error message printed when gdbserver can't find CWD

login
register
mail settings
Submitter Sergio Durigan Junior
Date Feb. 28, 2018, 4:46 p.m.
Message ID <20180228164656.25363-1-sergiodj@redhat.com>
Download mbox | patch
Permalink /patch/26122/
State New
Headers show

Comments

Sergio Durigan Junior - Feb. 28, 2018, 4:46 p.m.
I forgot to address Pedro's comment about my last patch and change the
order of the message printed when getcwd returns NULL on gdbserver.
This obvious commit does it.

gdb/gdbserver/ChangeLog:
2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>

	* server.c (captured_main): Change order of error message printed
	when the current working directory cannot be found.
---
 gdb/gdbserver/ChangeLog | 5 +++++
 gdb/gdbserver/server.c  | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

Patch

diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 8c3b02e5e4..ac88a9d778 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,8 @@ 
+2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* server.c (captured_main): Change order of error message printed
+	when the current working directory cannot be found.
+
 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
 
 	* server.c: Include "filenames.h" and "pathstuff.h".
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index 7745027628..f373d8a1e8 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -3573,7 +3573,7 @@  captured_main (int argc, char *argv[])
   current_directory = getcwd (NULL, 0);
   if (current_directory == NULL)
     {
-      error (_("%s: error finding working directory"),
+      error (_("Could not find current working directory: %s"),
 	     safe_strerror (errno));
     }