From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25009 invoked by alias); 7 Dec 2017 22:34:15 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 24997 invoked by uid 89); 7 Dec 2017 22:34:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: sessmg23.ericsson.net Received: from sessmg23.ericsson.net (HELO sessmg23.ericsson.net) (193.180.251.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 07 Dec 2017 22:34:11 +0000 Received: from ESESSHC009.ericsson.se (Unknown_Domain [153.88.183.45]) by sessmg23.ericsson.net (Symantec Mail Security) with SMTP id 73.28.13994.1E1C92A5; Thu, 7 Dec 2017 23:34:09 +0100 (CET) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (153.88.183.145) by oa.msg.ericsson.com (153.88.183.45) with Microsoft SMTP Server (TLS) id 14.3.352.0; Thu, 7 Dec 2017 23:34:08 +0100 Received: from elxacz23q12.polymtl.ca (132.207.200.163) by AMSPR07MB311.eurprd07.prod.outlook.com (2a01:111:e400:802f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.282.3; Thu, 7 Dec 2017 22:34:06 +0000 From: Simon Marchi To: CC: Simon Marchi Subject: [PATCH] python: Add qualified parameter to gdb.Breakpoint Date: Thu, 07 Dec 2017 22:34:00 -0000 Message-ID: <1512686013-24658-1-git-send-email-simon.marchi@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: CY4PR01CA0007.prod.exchangelabs.com (2603:10b6:903:1f::17) To AMSPR07MB311.eurprd07.prod.outlook.com (2a01:111:e400:802f::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ff598ecc-48f8-4381-3d73-08d53dc2a088 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307);SRVR:AMSPR07MB311; X-Microsoft-Exchange-Diagnostics: 1;AMSPR07MB311;3:EVi26nZg8vvGdqBjzlCIA5z8YLsg1Go6vWo1Zk2r00OoRc25PMpz/90yquoz7JG0Fc4/2VnQ22FAQLBQarMFdnqlMPf0Ov+/Bp2WKfKtCdcEUQniLw+cn4n0uQkmfStLw7loB7oAl2JQCR5Eqo3H0qxqWK9z21bfrsLNK2iZ5t6Ms0iVnHyAVzwoemZUu4JrVDv/8+ca4grWoxOFYEx1JpAguQFRUfKMJ5xcPZIt5E8iiUkK17hJf12eTA5SregA;25:Xek+YB18+0kEcpCZntBYi69ALvo0YU+QCbXj3/y8lY2cxu8kWcGdi12ghIznuwSQHiVbjDAZPkxqOP0yRtYkKJsw0RdQn4g9n1D2utgVLE49pG8YL4Q8QE4rnCEn/9ZZ5J+hN1zrF/E5C4KJqa2NqzZqGlnX/Y8hkkHZNgipus4bbYsHLTc0/4HegSca5aHEObbE+IKH5a2BI+Uf3wbWAzWdd6WoNq8GGcI/oZIOZCg5rTGi3prKXlVk6VT3SMh8fpcqGzb7UhWp07K5BqMqLfBrBjeWUbFMZpWwqC+6DxkPc12TDyDD58X/EBpqdgVRb4Y0TNKYi9BWi9ojjhy4o+oxDS2PXvOFAzhGHUxYbls=;31:Z861HidkamfAUCJjzFH+6cwYOv081Q3NlJOzYDynca0PyEJP1ZTwZno9dCAruTbbDE/0oil1h6z99e0dKfPzsxr3JC1ysnPqvxQ5PYcCUgZYh1JpyIqbxSgM7vxoMHrBAHF9Z2+WFwt4zQURHQv2YvjCKVN/LlbOqv//bjCoJRAqqXkgmED2Mo7SfoVC6Sg/X4mVyfSEQ4NsP+heNACcRIklrQ5iFcTtwt8trgyL69Q= X-MS-TrafficTypeDiagnostic: AMSPR07MB311: X-Microsoft-Exchange-Diagnostics: 1;AMSPR07MB311;20:tC3dZAlqKbXTfSK60QP5AjHiIY3mdS48cxoFNnDExs/izEiGBak121t4X1lnttOSzXWZqZl+GjNEAq7MO95iS6/koXt37itpc/oQtdbzyDUy7j6P63zlFvZtnKNWGQLNTjvwv7AcB72LLgsc4wxuEWXC8ApRbIeoSE8tpXJ+tx6FFzLFJ3iVvzj9KJYeG9xy06HovA/oUjpkhxtk+i2Qce05dIlkWGiCHL9EGptm0c20UyRoJ2/rwuf+MtqbT/q20/tWacReAOokknr/yZfpSuTS2f8viv6bYLKHD9ytkvlycsEHtlkJTCuHyCwyCrTBDmVXk20FV5Op8whVj5p2MYk9VUUFQkIOxGlkuzA5eaTBaO9UUuqMb5PgMUNMBsn+QGe+/jYZZBk9/YT7KFtlkEH/kDACcKFElh5mDMguk+CZQicEOqF+TpJzh1PIg2u+PlXFYTvUsUqr+bYOxNxpsUaKbIh7uYHN7mgLU884E/Y0T6A6XnHQM+oo0SwjN8Ao;4:DjliwfByksxB0Tqay99GZfZ97Lj5cBuODmPH7qVXA9DBMkBGUOo8e7OJ0e+lZeB5tNC/v28aYFAwo9/C6uRURetRUIQ3KykoWmCWtRChhRZ9nO0Qk8m2r3M4yWklGYxuoMiMR6ExVzDr3pzREDUDEw6HrNTZHc7sP4n97wAF71G8Q6LtFeEFZ6u6oebBPgfpR+vyilgyfIC2P8d4RC69V+FMeHEYSZsFtpa88VsTNXetd+CyroN6v0LrM78gLw5oBFPgD1Ax0mcAQzGWnjHyKw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3231022)(3002001)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(20161123564025)(20161123555025)(6072148)(201708071742011);SRVR:AMSPR07MB311;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:AMSPR07MB311; X-Forefront-PRVS: 05143A8241 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(366004)(376002)(39860400002)(346002)(54534003)(199004)(189003)(2906002)(106356001)(51416003)(105586002)(6666003)(47776003)(16526018)(6506006)(36756003)(7736002)(305945005)(6486002)(86362001)(6306002)(2351001)(53936002)(81166006)(53416004)(2361001)(16586007)(316002)(6916009)(478600001)(25786009)(6512007)(81156014)(68736007)(8676002)(6116002)(107886003)(69596002)(33646002)(66066001)(50466002)(4326008)(50226002)(48376002)(8936002)(5660300001)(97736004)(52116002)(3846002);DIR:OUT;SFP:1101;SCL:1;SRVR:AMSPR07MB311;H:elxacz23q12.polymtl.ca;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=simon.marchi@ericsson.com; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;AMSPR07MB311;23:Jf8d0t/QuDCACH5IR+uvy27yJlggZW/CQJ2sH6PFl2?= =?us-ascii?Q?RSY8eabY2cafgzkX9syv+ZY3wqj3JSrFJm2r2oMmpaiB/xpirRt+H172U0Ry?= =?us-ascii?Q?M2WimpgIHIMRlYLxZr4nB3gh1IOfFGh5WbaMM/h3ZQ2R1hfqtRJELTgCRfKT?= =?us-ascii?Q?gkNKB8ponjwnVYJfcq2N9PaEvPow16kVrtR1PnofwSJtwpIU8PP9FMi9SGOX?= =?us-ascii?Q?Or0KKFxcG2p8th0eq/x9GN2jiL7dfwNilBV+aFCX5s/XdG5mbpImoe1Ippv9?= =?us-ascii?Q?3NLST0/F80JfZ/GSd/KDQw6umh0g6YB5+Hf0qK9rozWU3dPQ3nvPQBiaFHec?= =?us-ascii?Q?wZ4pVOh54wweUxuq7i+D+Gg56BiyuQiV5LrRCzr3BHcz5Akc8fbi9Z8E8pKO?= =?us-ascii?Q?v3jlUCSql8G35YtyQd+c0Vn59QNQdZeMlE4gnrFoFD2KfWwpV3SyGCB2DezZ?= =?us-ascii?Q?OvAK6tIaAubmPxHNZopdPl3KbohIrWfXHCJ1lgxySW1AkVejPFGcWfri8gX0?= =?us-ascii?Q?AqFA4fbHp0vdZQAfi8Rk6Xs0bLWE+KYFbSxbUhbinZ9cWZ+ICI1lLMM4S30/?= =?us-ascii?Q?vrjxT62nQ6Yme2x6M+kL3HR1B0QekCPOCCWa3SxGK3dI+/k4bW4chOgAeB+F?= =?us-ascii?Q?xGooEZX1QImYVbiHO2Jd4cayDcOdnXlIcGRhu+V/Ui4WCij4Tc2xp0IINKkd?= =?us-ascii?Q?hPQa7y+RlGcda7fhHGtzcVil1FItUKgbSul19mBXTfLzVNZLoK30qnJwJ602?= =?us-ascii?Q?ELhXulkE8ucTMIYh9vMvhbWOJPWOJkzid0k2ZL0bisZHmInOKdSPrUt7j4fU?= =?us-ascii?Q?Eaua8lQeN2bZH7WDKFQc/kKJ6PSMppuEk+xauCXpA/+PF1BduozEcfWV1m92?= =?us-ascii?Q?Qj5ubeYU3HAW0h5XYyi0ESD+bZLLadLk1tQm6/AzwioU6UoK9zDLwycxR3dK?= =?us-ascii?Q?d5tGr6Fa81L0QsaVbvUHK+Oy/ecInF+tcHgW2+gRwtfzeIDGc3ci4vTld7Zl?= =?us-ascii?Q?2CoYILLAUpLnVa8a30+Cgni8HRQczh4hnGF2EwSlqLVTheypiQrFa+BnIU8S?= =?us-ascii?Q?bTHQwNwE32mS5Kr4jQEiBz2v2TJysB5MX7AeJbKNLc/dOaRwdld1mAULD1bI?= =?us-ascii?Q?5ORkcxSkeWwh6hm234c+KLuMYHpHBX?= X-Microsoft-Exchange-Diagnostics: 1;AMSPR07MB311;6:1ZATKDS+6u761Jx7LMgn00FAVQ7b9Uzfbn+aITLxOZxMPDRnJisOBecnuSK3AvqmzfylGXbchrM1aNXRZlUrVAwR0SLJQ/YhYJzhnAxBd/10MEWq6irsvP8bR6NkCaQUExBrFHJCBaXD3fosB2yHh/xt4B40iTriuDzlglPB6MWpSee7OlYjVZOFXtlhQAi6aYM5YHcyqIcs9fu/EEU4yHQ3QexrPJTfBGaYdygPwJFfFwcu4UHCqTrz1xbnp1+z7/YcfU78MErWXWsXVT1Xv6jAIbbVziKLCHxFIjXG0A9gaJYVrCdR2KaJ5TjND2yR4aXlB4aT4yCnjoRs2gruyUQ+CTCA7HdhISFuoJkD7JE=;5:eZB6woG3uWr4MK1OtREfvZYtC3GJmAxcKuDtpg1qT10UEDygLhjWq38HYNDuQQjwLUbtfyk3sV7yeh/mCXgIsJYxdZvKMREvFLDLRSawZwzPhK9dPgrQ1PdYtOuxF4VOMtSc1dMACzFl3Vvft9CtOtppOr8NeyaVjUrx8BMVO7c=;24:16vJ2qd7YG8x0G1v5+6TuZGMqsMXUmZcbXpjYtV7Q9OClFsiITtiyJ9axWtoispioSGhrm5f2zYx9f+Wjd9tew3RGqSMv5hC/3cOo8WCqn8=;7:j8FJ2c42KXcgXQ04of6h+lpBVcUw7qMaSYX+wnG+LsnAupxiE0BWthMy1B/k74W579Kd1haE3O82DLVrb+eOkH0UkIMud2YSSdagHoqlyKYS/IQ1puQX5AX8xNjyJ2MR1iu5D8l78LZposY60X5zObvt/mR8ZKh1t4WC9t9J/O0UvdQUyIDlhQSxpHySHnNe5sGl1H4V7O2UQ/V4efzKl18D3NN/08JeiBCNaW+uq96WsIpHEzWZO77lCqzAf//V SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Dec 2017 22:34:06.1838 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ff598ecc-48f8-4381-3d73-08d53dc2a088 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 92e84ceb-fbfd-47ab-be52-080c6b87953f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AMSPR07MB311 X-OriginatorOrg: ericsson.com X-IsSubscribed: yes X-SW-Source: 2017-12/txt/msg00150.txt.bz2 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. --- gdb/doc/python.texi | 12 +++-- gdb/location.c | 4 +- gdb/location.h | 11 +++-- gdb/python/py-breakpoint.c | 16 +++++-- gdb/testsuite/gdb.python/py-breakpoint.c | 8 ++++ gdb/testsuite/gdb.python/py-breakpoint.exp | 76 +++++++++++++++++++++++++++++- 6 files changed, 113 insertions(+), 14 deletions(-) diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi index 47f4e07..78280d0 100644 --- a/gdb/doc/python.texi +++ b/gdb/doc/python.texi @@ -4885,7 +4885,7 @@ create both breakpoints and watchpoints. The second accepts separate Python arguments similar to @ref{Explicit Locations} and can only be used to create breakpoints. -@defun Breakpoint.__init__ (spec @r{[}, type @r{][}, wp_class @r{][}, internal @r{][}, temporary @r{]}) +@defun Breakpoint.__init__ (spec @r{[}, type @r{][}, wp_class @r{][}, internal @r{][}, temporary @r{][}, qualified @r{]}) Create a new breakpoint according to @var{spec}, which is a string naming the location of a breakpoint, or an expression that defines a watchpoint. The contents can be any location recognized by the @code{break} command or, in the @@ -4909,14 +4909,20 @@ The optional @var{temporary} argument makes the breakpoint a temporary breakpoint. Temporary breakpoints are deleted after they have been hit. Any further access to the Python breakpoint after it has been hit will result in a runtime error (as that breakpoint has now been automatically deleted). + +The optional @var{qualified} argument is a boolean that allows restricting the +breakpoint to free-functions. It is equivalent to @code{break}'s +@code{-qualified} flag (@pxref{Linespec Locations}). + @end defun -@defun Breakpoint.__init__ (@r{[} source @r{][}, function @r{][}, label @r{][}, line @r{]}, @r{][} internal @r{][}, temporary @r{][}) +@defun Breakpoint.__init__ (@r{[} source @r{][}, function @r{][}, label @r{][}, line @r{]}, @r{][} internal @r{][}, temporary @r{][}, qualified @r{]}) Create a new explicit location breakpoint (@pxref{Explicit Locations}) according to the specifications contained in the key words @var{source}, @var{function}, @var{label} and @var{line}. -@var{internal} and @var{temporary} have the same usage as explained previously. +@var{internal}, @var{temporary} and @var{qualified} have the same usage as +explained previously. @end defun The available types are represented by constants defined in the @code{gdb} diff --git a/gdb/location.c b/gdb/location.c index 6752462..0f79764 100644 --- a/gdb/location.c +++ b/gdb/location.c @@ -915,10 +915,10 @@ string_to_event_location_basic (const char **stringp, event_location_up string_to_event_location (const char **stringp, - const struct language_defn *language) + const struct language_defn *language, + symbol_name_match_type match_type) { const char *arg, *orig; - symbol_name_match_type match_type = symbol_name_match_type::WILD; /* Try an explicit location. */ orig = arg = *stringp; diff --git a/gdb/location.h b/gdb/location.h index fcfa8fb..d5d879d 100644 --- a/gdb/location.h +++ b/gdb/location.h @@ -220,11 +220,14 @@ extern event_location_up This function is intended to be used by CLI commands and will parse explicit locations in a CLI-centric way. Other interfaces should use string_to_event_location_basic if they want to maintain support for - legacy specifications of probe, address, and linespec locations. */ + legacy specifications of probe, address, and linespec locations. -extern event_location_up - string_to_event_location (const char **argp, - const struct language_defn *langauge); + MATCH_TYPE should be either WILD or FULL. If -q/--qualified is specified + in the input string, it will take precedence over this parameter. */ + +extern event_location_up string_to_event_location + (const char **argp, const struct language_defn *langauge, + symbol_name_match_type match_type = symbol_name_match_type::WILD); /* Like string_to_event_location, but does not attempt to parse explicit locations. MATCH_TYPE indicates how function names should diff --git a/gdb/python/py-breakpoint.c b/gdb/python/py-breakpoint.c index f865317..5239713 100644 --- a/gdb/python/py-breakpoint.c +++ b/gdb/python/py-breakpoint.c @@ -694,7 +694,7 @@ bppy_init (PyObject *self, PyObject *args, PyObject *kwargs) { static const char *keywords[] = { "spec", "type", "wp_class", "internal", "temporary","source", "function", - "label", "line", NULL }; + "label", "line", "qualified", NULL }; const char *spec = NULL; enum bptype type = bp_breakpoint; int access_type = hw_write; @@ -707,12 +707,14 @@ bppy_init (PyObject *self, PyObject *args, PyObject *kwargs) char *label = NULL; char *source = NULL; char *function = NULL; + int qualified = 0; - if (!gdb_PyArg_ParseTupleAndKeywords (args, kwargs, "|siiOOsssO", keywords, + if (!gdb_PyArg_ParseTupleAndKeywords (args, kwargs, "|siiOOsssOp", keywords, &spec, &type, &access_type, &internal, &temporary, &source, - &function, &label, &lineobj)) + &function, &label, &lineobj, + &qualified)) return -1; @@ -759,6 +761,9 @@ bppy_init (PyObject *self, PyObject *args, PyObject *kwargs) case bp_breakpoint: { event_location_up location; + symbol_name_match_type func_name_match_type + = qualified ? symbol_name_match_type::FULL + : symbol_name_match_type::WILD; if (spec != NULL) { @@ -767,7 +772,8 @@ bppy_init (PyObject *self, PyObject *args, PyObject *kwargs) const char *copy = copy_holder.get (); location = string_to_event_location (©, - current_language); + current_language, + func_name_match_type); } else { @@ -782,6 +788,8 @@ bppy_init (PyObject *self, PyObject *args, PyObject *kwargs) explicit_loc.line_offset = linespec_parse_line_offset (line.get ()); + explicit_loc.func_name_match_type = func_name_match_type; + location = new_explicit_location (&explicit_loc); } diff --git a/gdb/testsuite/gdb.python/py-breakpoint.c b/gdb/testsuite/gdb.python/py-breakpoint.c index 562cab3..c9f124c 100644 --- a/gdb/testsuite/gdb.python/py-breakpoint.c +++ b/gdb/testsuite/gdb.python/py-breakpoint.c @@ -17,6 +17,14 @@ int result = 0; +namespace foo_ns +{ + int multiply (int i) + { + return i * i; + } +} + int multiply (int i) { return i * i; diff --git a/gdb/testsuite/gdb.python/py-breakpoint.exp b/gdb/testsuite/gdb.python/py-breakpoint.exp index e89b9b8..7b4cfaa 100644 --- a/gdb/testsuite/gdb.python/py-breakpoint.exp +++ b/gdb/testsuite/gdb.python/py-breakpoint.exp @@ -20,7 +20,9 @@ load_lib gdb-python.exp standard_testfile -if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { +set options {debug c++} + +if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} ${options}] } { return -1 } @@ -610,6 +612,77 @@ proc test_bkpt_explicit_loc {} { } } +proc_with_prefix test_bkpt_qualified {} { + global decimal hex testfile + + # Start with a fresh gdb. + clean_restart ${testfile} + + set one_location_re "Breakpoint $decimal at $hex:.*line $decimal." + set two_location_re "Breakpoint $decimal at $hex:.*2 locations." + + if ![runto_main] then { + fail "cannot run to main." + return 0 + } + + # Test the default value of "qualified". + delete_breakpoints + gdb_test \ + "python gdb.Breakpoint(\"multiply\")" \ + $two_location_re \ + "qualified implicitly false" + + # Test qualified=False. + delete_breakpoints + gdb_test \ + "python gdb.Breakpoint(\"multiply\", qualified=False)" \ + $two_location_re \ + "qualified false" + + # Test qualified=True. + delete_breakpoints + gdb_test \ + "python gdb.Breakpoint(\"multiply\", qualified=True)" \ + $one_location_re \ + "qualified true" + + # Test qualified=True with an explicit function. + delete_breakpoints + gdb_test \ + "python gdb.Breakpoint(function=\"multiply\", qualified=True)" \ + $one_location_re \ + "qualified true and explicit" + + # Test qualified=False with an explicit function. + delete_breakpoints + gdb_test \ + "python gdb.Breakpoint(function=\"multiply\", qualified=False)" \ + $two_location_re \ + "qualified false and explicit" + + # Test -q in the spec string. + delete_breakpoints + gdb_test \ + "python gdb.Breakpoint(\"-q multiply\")" \ + $one_location_re \ + "-q in spec string" + + # Test -q in the spec string with explicit location. + delete_breakpoints + gdb_test \ + "python gdb.Breakpoint(\"-q -function multiply\")" \ + $one_location_re \ + "-q in spec string with explicit location" + + # Test -q in the spec string and qualified=False (-q should win). + delete_breakpoints + gdb_test \ + "python gdb.Breakpoint(\"-q multiply\", qualified=False)" \ + $one_location_re \ + "-q in spec string and qualified false" +} + test_bkpt_basic test_bkpt_deletion test_bkpt_cond_and_cmds @@ -622,3 +695,4 @@ test_bkpt_address test_bkpt_pending test_bkpt_events test_bkpt_explicit_loc +test_bkpt_qualified -- 2.7.4