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]

[PING] [PATCH] [Python] Fix gdb.Value.dynamic_type for reference values


Original post: https://sourceware.org/ml/gdb-patches/2014-03/msg00542.html

gdb.Value.dynamic_type is supposed to work for reference and pointer
values.  However, the value object in the function 'valpy_get_dynamic_type'
was being dereferenced using 'value_ind' irrespective of the value type
being TYPE_CODE_PTR or TYPE_CODE_REF.  This patch fixes that to use
'coerce_ref' for TYPE_CODE_REF values.

ChangeLog:
2014-04-02  Siva Chandra Reddy  <sivachandra@google.com>

        * python/py-value.c (valpy_get_dynamic_type): Use coerce_ref to
        dereference TYPE_CODE_REF values.

        testsuite/
        * gdb.python/py-value.c: Improve test case.
        * gdb.python/py-value.exp: Add new test.

Attachment: fix_gdb_value_dynamic_type.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]