aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2011-07-27 17:41:21 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2011-07-27 17:41:21 +0000
commit11081198f1cca4499b966bb023db9f1c6be38843 (patch)
treeab89d9bf916fee02c066bd023c8b6022bfcc3ec7 /gdb
parent3c6e0cb359c01c16799d3aac21e0624c8a5477b4 (diff)
downloadgdb-11081198f1cca4499b966bb023db9f1c6be38843.zip
gdb-11081198f1cca4499b966bb023db9f1c6be38843.tar.gz
gdb-11081198f1cca4499b966bb023db9f1c6be38843.tar.bz2
gdb/
* 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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/gdb.base/help.exp2
-rw-r--r--gdb/typeprint.c6
4 files changed, 14 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b302e1c..71f21af 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
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.
* dwarf2expr.h (ctx_no_read_reg): New declaration.
* dwarf2read.c (read_2_signed_bytes, read_4_signed_bytes): Remove.
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 16ab82e..cfcc0ff 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,9 @@
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.
* gdb.dwarf2/dw2-simple-locdesc.exp: New file.
* gdb.dwarf2/dw2-stack-boundary.exp (check partial symtab errors):
diff --git a/gdb/testsuite/gdb.base/help.exp b/gdb/testsuite/gdb.base/help.exp
index 0219c76..3d59edf 100644
--- a/gdb/testsuite/gdb.base/help.exp
+++ b/gdb/testsuite/gdb.base/help.exp
@@ -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
diff --git a/gdb/typeprint.c b/gdb/typeprint.c
index 03e6332..cf4158d 100644
--- a/gdb/typeprint.c
+++ b/gdb/typeprint.c
@@ -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\"."));
}