This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] [Python] Add a boolean parameter "python resolve-operators"
- From: Siva Chandra <sivachandra at google dot com>
- To: gdb-patches <gdb-patches at sourceware dot org>, Doug Evans <dje at google dot com>
- Date: Thu, 14 May 2015 13:40:47 -0700
- Subject: Re: [PATCH] [Python] Add a boolean parameter "python resolve-operators"
- Authentication-results: sourceware.org; auth=none
- References: <CAGyQ6gyjc5AtEvySyN+gSpvmjTCxR2rsuSw8PcGC4zVPGiknDA at mail dot gmail dot com>
Ping.
On Sat, Mar 7, 2015 at 6:12 AM, Siva Chandra <sivachandra@google.com> wrote:
> The attached patch adds a boolean parameter "python
> resolve-operators". It is implemented using GDB's Python API. Python
> operators in GDB Python scripts will be resolved to overloaded C++
> operators (if they exist) only if this parameter is "on".
>
> gdb/ChangeLog:
>
> 2015-03-07 Siva Chandra Reddy <sivachandra@google.com>
>
> * NEWS (New commands): Add entries for
> "set python resolve-operators" and
> "show python resolve-operators".
> * data-directory/Makefile.in (PYTHON_FILE_LIST): Add
> gdb/parameters/__init__.py and
> gdb/parameters/resolve_operators.py.
> * python/lib/gdb/__init__.py (packages): Add 'parameters'.
> * python/lib/gdb/parameters/__init__.py: New file.
> * python/lib/gdb/parameters/resolve_operators.py: New file.
> * python/py-value.c (resolve_to_overloaded_operators): New
> function.
> (valpy_binop): Invoke value_x_binop only if resolving Python
> operators to C++ operators is enabled.
>
> gdb/testsuite/ChangeLog:
>
> 2015-03-07 Siva Chandra Reddy <sivachandra@google.com>
>
> * gdb.python/py-resolve-operators.cc: New file.
> * gdb.python/py-resolve-operators.exp: New file.