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/printcmd.c | |
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/printcmd.c')
-rw-r--r-- | gdb/printcmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/printcmd.c b/gdb/printcmd.c index 735b043..16ea2a6 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -1420,7 +1420,7 @@ x_command (char *exp, int from_tty) old_chain = make_cleanup (free_current_contents, &expr); val = evaluate_expression (expr); if (TYPE_CODE (value_type (val)) == TYPE_CODE_REF) - val = value_ind (val); + val = coerce_ref (val); /* In rvalue contexts, such as this, functions are coerced into pointers to functions. This makes "x/i main" work. */ if (/* last_format == 'i' && */ |