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]

[Patch v8] Debug methods using GDB Python


Hi,

Attached is the latest version of the patch which adds the debug
methods feature to the GDB Python API. Changes from v7:

1. I have cleaned up all formatting issues that I could identify.
Given that the patch is fairly large, I will not be surprised if I
missed some.
2. Fixed a memory leak.

I still do not have doc changes included in the patch. Would be good
to get feedback on the code changes while I am working on the doc
changes.

v7 posting for reference:
https://sourceware.org/ml/gdb-patches/2014-01/msg00882.html

2014-01-28  Siva Chandra Reddy  <sivachandra@google.com>

        * Makefile.in: Add entries for new files.
        * data-directory/Makefile.in: Add entries for new Python files.
        * eval.c (evaluate_subexp_standard): Lookup and invoke methods
        defined in extension languages.
        * valarith.c (value_x_binop, value_x_unop): Lookup and invoke
        overloaded operator methods defined in extension languages.
        * valops.c (find_oload_method_list, find_method_list,
        find_overload_match, find_oload_champ): Lookup methods defined
        in extension languages.
        (value_has_indirect_dynamic_type): New function to determine
        the indirect dynamic type of a value.
        * value.h (find_overload_match): Update signature.
        * ext-function.c: New file.
        * ext-function.h: New file.
        * python/py-debugmethods.c: New file.
        * python/py-objfile.c (objfile_object): New field
        'debugmethod_matchers'.
        (objfpy_dealloc): XDECREF on the new debugmethod_matcherss field.
        (objfpy_new, objfile_to_objfile_object): Initialize
        debugmethod_macthers field.
        (objfpy_get_debugmethod_matchers): New function.
        (objfile_getset): New entry 'debugmethod_matchers'.
        * python/py-progspace.c (pspace_object): New field
        'debugmethod_matchers'.
        (pspy_dealloc): XDECREF on the new debugmethod_matchers field.
        (pspy_new, pspace_to_pspace_object): Initialize
        debugmethod_matchers field.
        (pspy_get_debugmethod_matchers): New function.
        (pspace_getset): New entry 'debug_methods'.
        * python/python-internal.h: Add declarations for new functions.
        * python/python.c (_initialize_python): Invoke
        gdbpy_initialize_debugmethods.
        * python/python.h: Add declarations of new functions.
        * python/lib/gdb/__init__.py (debug_methods): New attribute.
        * python/lib/gdb/debugmethods.py: New file.
        * python/lib/gdb/command/debugmethods.py: New file.

        testuite/
        * gdb.python/py-debugmethods.cc: New testcase to test debug
        methods.
        * gdb.python/py-debugmethods.exp: New tests to test debug
        methods.
        * gdb.python/py-debugmethods.py: Python script supporting the
        new testcase and tests.

Attachment: dm_patch_v8.txt
Description: Text document


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