From 4c082a81dfebcca45e4ee8cb90490ab733b8e017 Mon Sep 17 00:00:00 2001 From: Siva Chandra Date: Sat, 25 Apr 2015 07:04:40 -0700 Subject: [Python] Add methods reference_value and const_value to gdb.Value. gdb/ChangeLog: * NEWS (Python Scripting): Mention the new gdb.Value methods. * python/py-value.c (valpy_reference_value): New function. (valpy_const_value): Likewise. (value_object_methods): Add new methods. * value.c (make_cv_value): New function. * value.h (make_cv_value): Declare. gdb/doc/ChangeLog: * python.texi (Values From Inferior): Add descriptions of new methods gdb.Value.reference_value and gdb.Value.const_value. gdb/testsuite/ChangeLog: * gdb.python/py-xmethods.cc: Enhance test case. * gdb.python/py-xmethods.exp: New tests. * gdb.python/py-xmethods.py (A_indexoper): New xmethod worker function. (B_indexoper): Likewise. (global_dm_list) : Add new xmethod worker functions. --- gdb/value.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gdb/value.h') diff --git a/gdb/value.h b/gdb/value.h index 25107a4..957bcd4 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -1040,6 +1040,8 @@ extern struct value *value_non_lval (struct value *); extern void value_force_lval (struct value *, CORE_ADDR); +extern struct value *make_cv_value (int, int, struct value *); + extern void preserve_one_value (struct value *, struct objfile *, htab_t); /* From valops.c */ -- cgit v1.1