From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 6E4EF3851C15 for ; Tue, 13 Oct 2020 15:06:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6E4EF3851C15 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36932) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kSLst-00078c-L3; Tue, 13 Oct 2020 11:06:39 -0400 Received: from [176.228.60.248] (port=3876 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kSLsr-0000rw-5y; Tue, 13 Oct 2020 11:06:39 -0400 Date: Tue, 13 Oct 2020 18:06:45 +0300 Message-Id: <83v9fe17y2.fsf@gnu.org> From: Eli Zaretskii To: Tankut Baris Aktemur Cc: gdb-patches@sourceware.org, simark@simark.ca In-Reply-To: (message from Tankut Baris Aktemur via Gdb-patches on Tue, 13 Oct 2020 14:25:02 +0200) Subject: Re: [PATCH v4 1/2] gdb/breakpoint: disable a bp location if condition is invalid at that location References: X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2020 15:06:41 -0000 > Date: Tue, 13 Oct 2020 14:25:02 +0200 > From: Tankut Baris Aktemur via Gdb-patches > Cc: simark@simark.ca > > gdb/ChangeLog: > 2020-07-31 Tankut Baris Aktemur > > * breakpoint.h (class bp_location) : New field. > * breakpoint.c (set_breakpoint_location_condition): New function. > (set_breakpoint_condition): Disable a breakpoint > location if parsing the condition string gives an error. > (should_be_inserted): Update to consider the 'disabled_by_cond' field. > (build_target_condition_list): Ditto. > (build_target_command_list): Ditto. > (build_bpstat_chain): Ditto. > (print_one_breakpoint_location): Ditto. > (print_one_breakpoint): Ditto. > (breakpoint_1): Ditto. > (bp_location::bp_location): Ditto. > (locations_are_equal): Ditto. > (update_breakpoint_locations): Ditto. > (enable_disable_bp_num_loc): Ditto. > (init_breakpoint_sal): Use set_breakpoint_location_condition. > (find_condition_and_thread_for_sals): New static function. > (create_breakpoint): Call find_condition_and_thread_for_sals. > (location_to_sals): Call find_condition_and_thread_for_sals instead > of find_condition_and_thread. > > gdb/testsuite/ChangeLog: > 2020-07-31 Tankut Baris Aktemur > > * gdb.base/condbreak-multi-context.cc: New file. > * gdb.base/condbreak-multi-context.exp: New file. > > gdb/doc/ChangeLog: > 2020-09-25 Tankut Baris Aktemur > > * gdb.texinfo (Set Breaks): Document disabling of breakpoint > locations for which the breakpoint condition is invalid. OK for the documentation part. But I have to wonder: GDB can automatically disable some conditional breakpoints, but it leaves enabling them to the user? Thanks.