diff options
author | Pierre Muller <muller@sourceware.org> | 2010-05-04 06:48:27 +0000 |
---|---|---|
committer | Pierre Muller <muller@sourceware.org> | 2010-05-04 06:48:27 +0000 |
commit | e1c34c5d94deefd6bc672d0058df0bb1513888b6 (patch) | |
tree | 6699b0aea3af81a75dc4126636bc3cb003790c14 /gdb/testsuite/gdb.cp/ref-types.exp | |
parent | 23c5e64ea49faf9d45f89903bb39ebff7d7e7652 (diff) | |
download | gdb-e1c34c5d94deefd6bc672d0058df0bb1513888b6.zip gdb-e1c34c5d94deefd6bc672d0058df0bb1513888b6.tar.gz gdb-e1c34c5d94deefd6bc672d0058df0bb1513888b6.tar.bz2 |
PR exp/11349.
* printcmd.c (x_command): Only dereference once implicitly for
TYPE_CODE_REF.
testsuite dir:
PR exp/11349.
* testsuite/gdb.cp/ref-types.exp: Add test to examine
use a reference local variable.
Diffstat (limited to 'gdb/testsuite/gdb.cp/ref-types.exp')
-rw-r--r-- | gdb/testsuite/gdb.cp/ref-types.exp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.cp/ref-types.exp b/gdb/testsuite/gdb.cp/ref-types.exp index 1308433..977eaa4 100644 --- a/gdb/testsuite/gdb.cp/ref-types.exp +++ b/gdb/testsuite/gdb.cp/ref-types.exp @@ -200,6 +200,11 @@ gdb_expect { timeout { fail "(timeout) print value of *rps" } } +# GDB had a bug about dereferencing a pointer type +# that would lead to wrong results +# if we try to examine memory at pointer value. + +gdb_test "x /hd rps" "$hex:\[ \t\]*-1" "examine value at rps" send_gdb "ptype rps\n" gdb_expect { |