aboutsummaryrefslogtreecommitdiff
path: root/gdb/NEWS
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@ericsson.com>2017-12-13 11:37:09 -0500
committerSimon Marchi <simon.marchi@ericsson.com>2017-12-13 11:44:28 -0500
commitb89641bab55496e52094282fabe146289c57b6d1 (patch)
treee11073cae0fca2b9f16b9d55625fec84cad1af66 /gdb/NEWS
parent6892d2e4df57160f7103fef0340ae3f55ac8b2b3 (diff)
downloadgdb-b89641bab55496e52094282fabe146289c57b6d1.zip
gdb-b89641bab55496e52094282fabe146289c57b6d1.tar.gz
gdb-b89641bab55496e52094282fabe146289c57b6d1.tar.bz2
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.
Diffstat (limited to 'gdb/NEWS')
-rw-r--r--gdb/NEWS4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/NEWS b/gdb/NEWS
index c6fe297..bd5ae36 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -81,7 +81,9 @@
GDB interpret the specified function name as a complete
fully-qualified name instead. For example, using the same C++
program, the "break -q B::func" command sets a breakpoint on
- "B::func", only.
+ "B::func", only. A parameter has been added to the Python
+ gdb.Breakpoint constructor to achieve the same result when creating
+ a breakpoint from Python.
* Breakpoints on functions marked with C++ ABI tags