]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Wed, 27 Jul 2011 17:41:21 +0000 (17:41 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Wed, 27 Jul 2011 17:41:21 +0000 (17:41 +0000)
* typeprint.c (_initialize_typeprint): Extend the help of "whatis" and
"ptype" by their typedefs difference.

gdb/testsuite/
* gdb.base/help.exp (help whatis): Update the expected string.

gdb/ChangeLog
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/help.exp
gdb/typeprint.c

index b302e1cd25948ebe8c4fa919d1c8800788ead933..71f21af10aa2d95c5aa6459adf7f601d0f3e8ff3 100644 (file)
@@ -1,3 +1,8 @@
+2011-07-27  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * typeprint.c (_initialize_typeprint): Extend the help of "whatis" and
+       "ptype" by their typedefs difference.
+
 2011-07-27  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        * dwarf2expr.c (ctx_no_read_reg): New function.
index 16ab82efb33b9cc3ef8e0f354b1c67ecf9df241b..cfcc0ff01e04ec9f05d01b4e70c0084863da2647 100644 (file)
@@ -1,3 +1,7 @@
+2011-07-27  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * gdb.base/help.exp (help whatis): Update the expected string.
+
 2011-07-27  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        * gdb.dwarf2/dw2-simple-locdesc.S: New file.
index 0219c7604e082e5ab54008af22a5805d5f87ffce..3d59edf4ef90f5a032c7f788a07cae732a71b782 100644 (file)
@@ -685,7 +685,7 @@ test_class_help "user-defined" {
 # test help watch
 gdb_test "help watch" "Set a watchpoint for an expression\.\[\r\n\]+Usage: watch .-l.-location. EXPRESSION\[\r\n\]+A watchpoint stops execution of your program whenever the value of\[\r\n\]+an expression changes\.\[\r\n\]+If -l or -location is given, this evaluates EXPRESSION and watches\[\r\n\]+the memory to which it refers\." "help watch"
 # test help whatis
-gdb_test "help whatis" "Print data type of expression EXP\." "help whatis"
+gdb_test "help whatis" "Print data type of expression EXP\.\r\nOnly one level .*" "help whatis"
 # test help where
 gdb_test "help where" "Print backtrace of all stack frames, or innermost COUNT frames\.\[\r\n\]+With a negative argument, print outermost -COUNT frames\.\[\r\n\]+Use of the 'full' qualifier also prints the values of the local variables\." "help where"
 # test help x
index 03e633241c3b6011969e87ca406658ff6dd93336..cf4158da9c0f8343604900b283481c8f50efe2b7 100644 (file)
@@ -316,8 +316,10 @@ _initialize_typeprint (void)
 Print definition of type TYPE.\n\
 Argument may be a type name defined by typedef, or \"struct STRUCT-TAG\"\n\
 or \"class CLASS-NAME\" or \"union UNION-TAG\" or \"enum ENUM-TAG\".\n\
-The selected stack frame's lexical context is used to look up the name."));
+The selected stack frame's lexical context is used to look up the name.\n\
+Contrary to \"whatis\", \"ptype\" always unrolls any typedefs."));
 
   add_com ("whatis", class_vars, whatis_command,
-          _("Print data type of expression EXP."));
+          _("Print data type of expression EXP.\n\
+Only one level of typedefs is unrolled.  See also \"ptype\"."));
 }