From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by sourceware.org (Postfix) with ESMTPS id 57DE03858D3C for ; Mon, 16 May 2022 18:40:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 57DE03858D3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f41.google.com with SMTP id w4so21657681wrg.12 for ; Mon, 16 May 2022 11:40:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=XvBmGQVG2ZEmwtmiEe+Dxc66OthqnLs4thEblDHatuY=; b=2rSb1Sx2ybwH5PXwXlypRULJ7s8LBjYJ+3ee+N4QqbIFjfVrS7AdflM0VM5JJRFFmd 64uQVkYgTM4h/2Zir1+1pOqT4y3q/fv+FzLeoZAAR7pDuAiAbXiaMCayq0woA08JeS2K 2XuLJeaq5K3F5dAOosQcKcEF5yJezbsb2g0ggKJ1E6Je8MpsGb7RoExr9MT3ogeMAQ2Z u4V5RWaVtbtW8ARJOM0CyJrTtn88gf+AdHVhtgV+hpD80gfqVBWe+fFCt3PZ+XAFAh3f OB9OFVtdZymwTDv2xGatpvI+ITQU7rGwriKPzgFbtHU3ib6phj2Mum1tir3P/1zZKDks dtLQ== X-Gm-Message-State: AOAM531nYgD3VrViD3DWIvYmCHzqkmhHQv9jrz1cE2AexrXUniEYAzUb 8kgLLHQLsU0sqTqCmMy5up0ikBEozfY= X-Google-Smtp-Source: ABdhPJyO/Z8GXS5ue8Xbo2z7SWedkaTS8YKZb0ENA6eO2EtkAZShB1aQxIm62mKROdq/VleS56twxA== X-Received: by 2002:a05:6000:1a8e:b0:20c:be8c:10a4 with SMTP id f14-20020a0560001a8e00b0020cbe8c10a4mr14935355wry.437.1652726432651; Mon, 16 May 2022 11:40:32 -0700 (PDT) Received: from localhost ([2001:8a0:f924:2600:209d:85e2:409e:8726]) by smtp.gmail.com with ESMTPSA id 22-20020a05600c021600b003942a244ed1sm36638wmi.22.2022.05.16.11.40.31 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 May 2022 11:40:31 -0700 (PDT) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 00/23] More breakpoints cleanups Date: Mon, 16 May 2022 19:40:07 +0100 Message-Id: <20220516184030.665489-1-pedro@palves.net> X-Mailer: git-send-email 2.36.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Mon, 16 May 2022 18:40:35 -0000 The main goal of this series was to eliminate init_raw_breakpoint. It slowly tweaks a number of things to be able to do that. Along the way, it converts the remaining init_foo functions to proper ctors, and tweaks the class hierarchy a bit such that all code breakpoints inherit from base_breakpoint. In the end, it proposes renaming base_breakpoint to code_breakpoint. By inspection, I ran into a couple bugs around momentary breakpoints. There are a couples patches in here to fix them. I also noticed that nothing currently exercises the paths that make create_breakpoints_sal actually create more than one breakpoint. One of the patches here is about adding a testcase for that. See the individual patches for details. Pedro Alves (23): add_location_to_breakpoint -> breakpoint::add_location Make structs breakpoint/base_breakpoint/catchpoint be abstract ranged_breakpoint: don't use init_raw_breakpoint ranged_breakpoint, use install_breakpoint ranged_breakpoint - move initialization to ctor Make a few functions work with base_breakpoint instead of breakpoint More breakpoint_ops parameter elimination Remove "internal" parameter from a couple functions init_breakpoint_sal -> base_breakpoint::base_breakpoint Make ada_catchpoint_location's owner ctor parameter be ada_catchpoint Convert init_ada_exception_catchpoint to a ctor Refactor set_internal_breakpoint / internal_breakpoint ctor Refactor momentary breakpoints, eliminate set_raw_breakpoint{,_without_location} Make exception_catchpoint inherit base_breakpoint instead of catchpoint Make breakpoint_address_bits look at the location kind Make catchpoint inherit breakpoint, eliminate init_raw_breakpoint Move common bits of catchpoint/exception_catchpoint to breakpoint's ctor Move add_location(sal) to base_breakpoint Add/tweak intro comments of struct breakpoint and several subclasses Momentary breakpoints should have no breakpoint number Make sure momentary breakpoints are always thread-specific Test "set multiple-symbols on" creating multiple breakpoints Rename base_breakpoint -> code_breakpoint gdb/ada-lang.c | 81 ++- gdb/break-catch-syscall.c | 6 +- gdb/break-catch-throw.c | 14 +- gdb/breakpoint.c | 805 ++++++++++++----------------- gdb/breakpoint.h | 93 ++-- gdb/elfread.c | 6 +- gdb/mi/mi-cmd-break.c | 4 +- gdb/minsyms.c | 4 +- gdb/python/py-finishbreakpoint.c | 2 +- gdb/symtab.h | 5 +- gdb/testsuite/gdb.cp/ovldbreak.exp | 100 +++- 11 files changed, 546 insertions(+), 574 deletions(-) base-commit: e90601a4f1af82ff5350797ddc54e24efd731535 -- 2.36.0