mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 17:18:55 +00:00
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.
This commit is contained in:
@@ -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' && */
|
||||
|
||||
Reference in New Issue
Block a user