From: Eli Zaretskii <eliz@gnu.org>
To: Simon Marchi <simon.marchi@ericsson.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] python: Add qualified parameter to gdb.Breakpoint
Date: Fri, 08 Dec 2017 14:15:00 -0000 [thread overview]
Message-ID: <83efo5wbke.fsf@gnu.org> (raw)
In-Reply-To: <1512686013-24658-1-git-send-email-simon.marchi@ericsson.com> (message from Simon Marchi on Thu, 7 Dec 2017 17:33:33 -0500)
> From: Simon Marchi <simon.marchi@ericsson.com>
> CC: Simon Marchi <simon.marchi@ericsson.com>
> Date: Thu, 7 Dec 2017 17:33:33 -0500
>
> This patch adds the possibility to pass a qualified=True|False parameter
> when creating a breakpoint in Python. It is equivalent to using
> -qualified in a linespec. The parameter actually accepts any Python
> value, and converts it to boolean using Python's standard rules for
> that (https://docs.python.org/3/library/stdtypes.html#truth).
>
> Unlike the -source/-line/-function/-label parameters, it is possible to
> use -qualified with a "normal" (non-explicit) linespec. Therefore, it
> is possible (unlike these other parameters) to use this new parameter
> along with the spec parameter.
>
> I updated the py-breakpoint.exp test. To be able to test multiple
> locations using a namespace, I had to switch the test case to compile as
> C++. If we really wanted to, we could run it as both C and C++, but
> omit the C++-specific parts when running it as C.
>
> gdb/ChangeLog:
>
> * location.h (string_to_event_location): Add match_type
> parameter.
> * location.c (string_to_event_location): Likewise.
> * python/py-breakpoint.c (bppy_init): Handle qualified
> parameter.
>
> gdb/doc/ChangeLog:
>
> * python.texi (Manipulating breakpoints using Python): Document
> qualified parameter to gdb.Breakpoint.
>
> gdb/testsuite/ChangeLog:
>
> * gdb.python/py-breakpoint.c (foo_ns::multiply): New function.
> * gdb.python/py-breakpoint.exp: Compile the test case as c++,
> call test_bkpt_qualified.
> (test_bkpt_qualified): New proc.
OK for the documentation part. (Do we need a NEWS entry?)
next prev parent reply other threads:[~2017-12-08 14:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-07 22:34 Simon Marchi
2017-12-08 12:05 ` Pedro Alves
2017-12-08 18:42 ` Simon Marchi
2017-12-13 13:17 ` Pedro Alves
2017-12-13 16:45 ` Simon Marchi
2017-12-08 14:15 ` Eli Zaretskii [this message]
2017-12-08 18:27 ` Simon Marchi
2017-12-08 19:47 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83efo5wbke.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@ericsson.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox