binutils-gdb/gdb/testsuite/gdb.python
Simon Marchi b89641bab5 python: Add qualified parameter to gdb.Breakpoint
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.
2017-12-13 11:44:28 -05:00
..
amd64-py-framefilter-invalidarg.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
lib-types.cc update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
lib-types.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-arch.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-arch.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-as-string.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-as-string.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-bad-printers.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-bad-printers.exp Change method of loading .py files in Python tests 2017-01-26 16:12:12 -05:00
py-bad-printers.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-block.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-block.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-breakpoint-create-fail.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-breakpoint-create-fail.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-breakpoint-create-fail.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-breakpoint.c python: Add qualified parameter to gdb.Breakpoint 2017-12-13 11:44:28 -05:00
py-breakpoint.exp python: Add qualified parameter to gdb.Breakpoint 2017-12-13 11:44:28 -05:00
py-caller-is.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-caller-is.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-cmd.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-cmd.exp PR cli/21688: Detect aliases when issuing python/compile/guile commands (and fix last commit) 2017-06-30 09:31:21 -04:00
py-completion.exp gdb: Fix a few unstable test names 2017-03-08 12:46:44 +00:00
py-completion.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-error.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-error.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-events-shlib.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-events.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-events.exp PR python/13598 - add before_prompt event 2017-02-14 10:38:56 -07:00
py-events.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-evsignal.exp kfail gdb.python/py-evsignal.exp on RSP targets properly 2017-10-13 12:29:49 +01:00
py-evthreads.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-evthreads.exp Remove is_remote kfail from gdb.python/py-evthreads.exp 2017-10-13 13:25:20 +01:00
py-explore-cc.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-explore.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-explore.cc update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-explore.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-finish-breakpoint.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-finish-breakpoint.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-finish-breakpoint.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-finish-breakpoint2.cc update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-finish-breakpoint2.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-finish-breakpoint2.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-frame-args.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-frame-args.exp Change method of loading .py files in Python tests 2017-01-26 16:12:12 -05:00
py-frame-args.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-frame-inline.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-frame-inline.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-frame.c
py-frame.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-framefilter-gdb.py.in update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-framefilter-invalidarg-gdb.py.in update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-framefilter-invalidarg.exp Change method of loading .py files in Python tests 2017-01-26 16:12:12 -05:00
py-framefilter-invalidarg.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-framefilter-mi.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-framefilter-mi.exp Change method of loading .py files in Python tests 2017-01-26 16:12:12 -05:00
py-framefilter.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-framefilter.exp Change method of loading .py files in Python tests 2017-01-26 16:12:12 -05:00
py-framefilter.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-function.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-inferior.c gdb/ 2012-07-26 19:09:35 +00:00
py-inferior.exp Add new_inferior, inferior_deleted, and new_thread events 2017-09-11 14:15:20 -06:00
py-infthread.c
py-infthread.exp Make gdb.selected_thread().inferior return a new reference 2017-10-28 14:19:08 -04:00
py-lazy-string.c gdb.python/py-lazy-string (pointer): Really add new typedef. 2017-03-16 10:43:21 -07:00
py-lazy-string.exp Fix various python lazy string bugs. 2017-03-16 09:28:11 -07:00
py-linetable.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-linetable.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-linetable.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-lookup-type.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-mi-events-gdb.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-mi-events.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-mi-events.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-mi-objfile-gdb.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-mi-objfile.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-mi-objfile.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-mi.exp Change method of loading .py files in Python tests 2017-01-26 16:12:12 -05:00
py-objfile-script-gdb.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-objfile-script.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-objfile-script.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-objfile.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-objfile.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-parameter.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-pp-integral.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-pp-integral.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-pp-integral.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-pp-maint.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-pp-maint.exp Change method of loading .py files in Python tests 2017-01-26 16:12:12 -05:00
py-pp-maint.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-pp-re-notag.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-pp-re-notag.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-pp-re-notag.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-pp-registration.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-pp-registration.exp Change method of loading .py files in Python tests 2017-01-26 16:12:12 -05:00
py-pp-registration.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-prettyprint.c Fix type casts losing typedefs and reimplement "whatis" typedef stripping 2017-08-21 11:34:32 +01:00
py-prettyprint.exp Fix type casts losing typedefs and reimplement "whatis" typedef stripping 2017-08-21 11:34:32 +01:00
py-prettyprint.py Fix type casts losing typedefs and reimplement "whatis" typedef stripping 2017-08-21 11:34:32 +01:00
py-progspace.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-progspace.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-prompt.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-prompt.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-rbreak-func2.c Add Python rbreak command. 2017-11-16 14:14:03 +00:00
py-rbreak.c Add Python rbreak command. 2017-11-16 14:14:03 +00:00
py-rbreak.exp Fix Python rbreak tests setting too many breakpoints when glibc debug info is installed. 2017-11-29 16:50:36 +00:00
py-record-btrace-threads.c Python: Use correct ptid in btrace recording 2017-05-02 11:35:54 +02:00
py-record-btrace-threads.exp Fix gdb.python/py-record-btrace-threads.exp with Python 3 2017-05-04 16:02:36 +01:00
py-record-btrace.c python: Add tests for record Python bindings 2017-02-14 10:57:56 +01:00
py-record-btrace.exp Python: Move and rename gdb.BtraceFunction 2017-05-02 11:35:54 +02:00
py-record-full.c python: Add tests for record Python bindings 2017-02-14 10:57:56 +01:00
py-record-full.exp python: Add tests for record Python bindings 2017-02-14 10:57:56 +01:00
py-recurse-unwind.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-recurse-unwind.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-recurse-unwind.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-rvalue-ref-value-cc.cc Add rvalue reference tests and docs 2017-03-20 13:47:59 -07:00
py-rvalue-ref-value-cc.exp Add rvalue reference tests and docs 2017-03-20 13:47:59 -07:00
py-section-script.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-section-script.exp Fix warning: Invalid entry in .debug_gdb_scripts section 2017-03-29 21:53:43 +02:00
py-section-script.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-shared-sl.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-shared.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-shared.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-strfns.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-strfns.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-symbol.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-symbol.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-symtab.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-sync-interp.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-sync-interp.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-template.cc update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-template.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-thrhandle.c Test case for Inferior.thread_from_thread_handle 2017-09-21 11:49:48 -07:00
py-thrhandle.exp Skip gdb.python/py-thrhandle.exp if python is not enabled. 2017-11-03 10:41:03 +00:00
py-type.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-type.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-typeprint.cc update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-typeprint.exp Change method of loading .py files in Python tests 2017-01-26 16:12:12 -05:00
py-typeprint.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-unwind-maint.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-unwind-maint.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-unwind-maint.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-unwind.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-unwind.exp gdb.python/py-unwind: Disable stack protection 2017-07-22 00:01:03 +02:00
py-unwind.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-value-cc.cc update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-value-cc.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-value.c Fix various python lazy string bugs. 2017-03-16 09:28:11 -07:00
py-value.exp Fix various python lazy string bugs. 2017-03-16 09:28:11 -07:00
py-xmethods.cc update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-xmethods.exp Fix Python test to use lowercase command 2017-02-10 12:24:35 -07:00
py-xmethods.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
python-1.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
python.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
python.exp Make gdb.python/python.exp more robust 2017-01-20 13:15:36 -06:00
source1 update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
source2.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00