gdb/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Mon, 6 Aug 2012 17:13:27 +0000 (17:13 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Mon, 6 Aug 2012 17:13:27 +0000 (17:13 +0000)
2012-08-06  Nathaniel Flath  <flat0103@gmail.com>
* NEWS: New entry for 'cd' default parameters.
* cli/cli-cmds.c (cd_command): Replace error_no_arg by DIR assignment.

gdb/doc/
2012-08-06  Nathaniel Flath  <flat0103@gmail.com>
* gdb.texinfo (Working Directory): Added information about new
default argument for 'cd' command.

gdb/ChangeLog
gdb/NEWS
gdb/cli/cli-cmds.c
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo

index 336ab5edf7e0d2d00b994444da6b73af011c399d..09886104a9e5fcc1857b45f550c9df44443d2067 100644 (file)
@@ -1,3 +1,8 @@
+2012-08-06  Nathaniel Flath  <flat0103@gmail.com>
+
+       * NEWS: New entry for 'cd' default parameters.
+       * cli/cli-cmds.c (cd_command): Replace error_no_arg by DIR assignment.
+
 2012-08-03  Tom Tromey  <tromey@redhat.com>
 
        * dwarf2-frame.c (dwarf2_frame_cache): Call do_cleanups before
index a590bee506cfba58bc1728296132ce8c5e002deb..06df79e8a13098cc7363c885cfa00e606e4bcf85 100644 (file)
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -3,6 +3,9 @@
 
 *** Changes since GDB 7.5
 
+* The 'cd' command now defaults to using '~' (the home directory) if not
+  given an argument.
+
 * New configure options
 
 --enable-libmcheck/--disable-libmcheck
index f2328e8ce7d3b1e33b8cd9dc8090ef2579d1f06d..d9849caa3941ac422e8c29873c63b42f5ca2d682 100644 (file)
@@ -365,7 +365,7 @@ cd_command (char *dir, int from_tty)
   dont_repeat ();
 
   if (dir == 0)
-    error_no_arg (_("new working directory"));
+    dir = "~";
 
   dir = tilde_expand (dir);
   make_cleanup (xfree, dir);
index 91d273fb9ca42f94bcdf33ff87cfbf156a40e5cc..ef48356e7bc22ca0d69200cffc7b9f9fc36dae95 100644 (file)
@@ -1,3 +1,8 @@
+2012-08-06  Nathaniel Flath  <flat0103@gmail.com>
+
+       * gdb.texinfo (Working Directory): Added information about new
+       default argument for 'cd' command.
+
 2012-08-06  Yao Qi  <yao@codesourcery.com>
 
        * gdb.texinfo (Remote Configuration): Add kindex for 'set
index 9f9fe40670ae4a776f5ed05c7e8d4b01c9c13486..d5e65852e213cefa0e3eaf187de6923266ee0db8 100644 (file)
@@ -2267,8 +2267,9 @@ Specify Files}.
 @table @code
 @kindex cd
 @cindex change working directory
-@item cd @var{directory}
-Set the @value{GDBN} working directory to @var{directory}.
+@item cd @r{[}@var{directory}@r{]}
+Set the @value{GDBN} working directory to @var{directory}.  If not
+given, @var{directory} uses @file{'~'}.
 
 @kindex pwd
 @item pwd
This page took 0.071723 seconds and 4 git commands to generate.