* mi/mi-cmd-stack.c (list_args_or_locals): Workaround
[deliverable/binutils-gdb.git] / gdb / mi / mi-cmd-env.c
index 327ddc508ea3b596772b528a06423834f983c71a..cbc9bdb7ce0aa91095ea6527cdd5f57827c17ae6 100644 (file)
@@ -1,6 +1,7 @@
 /* MI Command Set - environment commands.
 
-   Copyright (C) 2002, 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2004, 2007, 2008, 2009
+   Free Software Foundation, Inc.
 
    Contributed by Red Hat Inc.
 
@@ -78,7 +79,10 @@ mi_cmd_env_pwd (char *command, char **argv, int argc)
      
   /* Otherwise the mi level is 2 or higher.  */
 
-  getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
+  if (! getcwd (gdb_dirbuf, sizeof (gdb_dirbuf)))
+    error (_("mi_cmd_env_pwd: error finding name of working directory: %s"),
+           safe_strerror (errno));
+    
   ui_out_field_string (uiout, "cwd", gdb_dirbuf);
 }
 
This page took 0.025663 seconds and 4 git commands to generate.