This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi all, In an other thread, I have sent a patch for a new 'explore' command implemented in Python as well as in C. For the Python implementation, I wanted something which can 'dereference' a C++ reference value. Unless I am missing something, I couldn't find anything which can do this in the Python API. Attached is a patch which extends the Python API method Value.dereference to 'dereference' C++ reference values as well. I am probably overloading the term 'dereference' as used in the normal (pointer dereferencing) sense. Code Changelog: 2012-03-12 Siva Chandra <sivachandra@google.com> Python scripting: Extend the functionality of the method Value.dereference to dereference C++ reference values. * NEWS: Add entry under 'Python scripting' about the extended functionality of the method Value.dereference. * python/py-value.c (valpy_dereference): Extend to dereference values of type TYPE_CODE_REF. * testsuite/gdb.python/py-value.cc: Add new test case for testing the methodology exposing C++ values to Python. * testsuite/gdb.python/py-value-cc.exp: Add tests testing the methodology exposing C++ values to Python. * testsuite/gdb.python/Makefile.in: Add py-value-cc to EXECUTABLES. Docs Changelog: 2012-03-12 Siva Chandra <sivachandra@google.com> * gdb.texinfo (Python API/Values From Inferior): Document extended functionality of the method Value.dereference. Thanks, Siva Chandra
Attachment:
value_dereference_patch_v1.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |