aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcall.c
diff options
context:
space:
mode:
authorArtemiy Volkov <artemiyv@acm.org>2017-03-20 13:47:41 -0700
committerKeith Seitz <keiths@redhat.com>2017-03-20 13:47:41 -0700
commita65cfae5f8b268158c23a862e7a996d15bbcef0e (patch)
tree1caa41d0a85a2a4e47a358e28b3958299580331b /gdb/infcall.c
parent3b22433085e4cfee83f5c52f3baa8fb9bc67f8dd (diff)
downloadgdb-a65cfae5f8b268158c23a862e7a996d15bbcef0e.zip
gdb-a65cfae5f8b268158c23a862e7a996d15bbcef0e.tar.gz
gdb-a65cfae5f8b268158c23a862e7a996d15bbcef0e.tar.bz2
Add ability to return rvalue reference values from value_ref
Parameterize value_ref() by the kind of reference type the value of which is requested. Change all callers to use the new API. gdb/ChangeLog PR gdb/14441 * ada-lang.c (ada_evaluate_subexp): Adhere to the new value_ref() interface. * c-valprint.c (c_value_print): Likewise. * infcall.c (value_arg_coerce): Likewise. * python/py-value.c (valpy_reference_value): Likewise. * valops.c (value_cast, value_reinterpret_cast) (value_dynamic_cast, typecmp): Likewise. (value_ref): Parameterize by kind of return value reference type. * value.h (value_ref): Add new parameter "refcode".
Diffstat (limited to 'gdb/infcall.c')
-rw-r--r--gdb/infcall.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/infcall.c b/gdb/infcall.c
index f55acb5..713738e 100644
--- a/gdb/infcall.c
+++ b/gdb/infcall.c
@@ -168,7 +168,7 @@ value_arg_coerce (struct gdbarch *gdbarch, struct value *arg,
if the value was not previously in memory - in some cases
we should clearly be allowing this, but how? */
new_value = value_cast (TYPE_TARGET_TYPE (type), arg);
- new_value = value_ref (new_value);
+ new_value = value_ref (new_value, TYPE_CODE (type));
return new_value;
}
case TYPE_CODE_INT: