Message ID | cover.1685479504.git.aburgess@redhat.com |
---|---|
Headers |
Return-Path: <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 46DA43856243 for <patchwork@sourceware.org>; Tue, 30 May 2023 20:47:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 46DA43856243 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1685479647; bh=G94qd7R+Jy1UZwgc4HFucCEUcwJ3dIHiCEJftrfbVOI=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=OvsbMbFMxTtomeWwVdIviYwHQ2aDLrxczCGBQYsrd5u8ONLS7fTw5uoCi0BLSQtya UrOLBKXTxSOzQaUxBmBPjjt+FnuhOmmrRe1PNea32llTeMppW/8mxcirxYWGArSok4 7hmU0pxzCGTQdztUAL7hufZb4fRHN4Dro83VZ8v0= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id B7C7B3858D28 for <gdb-patches@sourceware.org>; Tue, 30 May 2023 20:47:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B7C7B3858D28 Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-638-u6QWGiO5PGK_M107bNmHkQ-1; Tue, 30 May 2023 16:47:00 -0400 X-MC-Unique: u6QWGiO5PGK_M107bNmHkQ-1 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-4f4b64cd0daso2723570e87.3 for <gdb-patches@sourceware.org>; Tue, 30 May 2023 13:46:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685479618; x=1688071618; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=G94qd7R+Jy1UZwgc4HFucCEUcwJ3dIHiCEJftrfbVOI=; b=hxk8T/LU3JDJ1x/haT0a4aQ4GQL3GpugLw7/HPoCZ6Xfntgu7l/6cVtDCRhjE+J1iN y3Dgqx6VWG34RLx7hbi/7+8rQ7RmLRFoQCuSkCkoIuYgezv0b/XQl9KR5LEi9GQOjNB6 zsqbz4nh+0ADviFTSW1DfXouE2VUOd3rWPFxtMvYo2l2tcMH0ygwiSr4WvkzODBUhn+E s7A8CnGDg54onCfTErQx7tXduO26Fs9uych5YXMHYGwiI1bqu2cUGDzcLeDgZ9Rg9PZX r5xsM+v6sANTfm2YFds7CCdSiXOZXJoDW7XtIu3xSpjM/huTrLwmhL5qZGo7L3LRmszl 95nQ== X-Gm-Message-State: AC+VfDz8oZ9PSlqXlSGxM70vYHIZn3l5CtFFNyzvAg8I5ih5UqX/dK9h oh2cYIbYzm7uRajwUbpFGoJj+VyKjC69sX3tkrYUS6sXA/rzH6ThU8Cy1rOqgDSuNYwqPBT0L5o sWYbL5/HRgf3jpzEK6wCYw9pmrl6Nl/6M5AYuDEbLV1Ce9+ilDvqA3Jz9PS9lzRWvCwTAdfd8wH fsOAuCHQ== X-Received: by 2002:ac2:4435:0:b0:4f4:b0d0:63fb with SMTP id w21-20020ac24435000000b004f4b0d063fbmr1292213lfl.35.1685479618059; Tue, 30 May 2023 13:46:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7XQtWNqkZNJyGdd0OzJ4XEs9lHCJHDha5fM8USNdaqpENLjWQjmDJIBSi+5fU0iIHlOX90Yg== X-Received: by 2002:ac2:4435:0:b0:4f4:b0d0:63fb with SMTP id w21-20020ac24435000000b004f4b0d063fbmr1292204lfl.35.1685479617647; Tue, 30 May 2023 13:46:57 -0700 (PDT) Received: from localhost (11.72.115.87.dyn.plus.net. [87.115.72.11]) by smtp.gmail.com with ESMTPSA id u14-20020adfeb4e000000b003062b6a522bsm4261007wrn.96.2023.05.30.13.46.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 May 2023 13:46:57 -0700 (PDT) To: gdb-patches@sourceware.org Cc: Andrew Burgess <aburgess@redhat.com> Subject: [PATCHv3 0/9] thread-specific breakpoints in just some inferiors Date: Tue, 30 May 2023 21:46:44 +0100 Message-Id: <cover.1685479504.git.aburgess@redhat.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <cover.1684178710.git.aburgess@redhat.com> References: <cover.1684178710.git.aburgess@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham 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 <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> From: Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org> Reply-To: Andrew Burgess <aburgess@redhat.com> Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
thread-specific breakpoints in just some inferiors
|
|
Message
Andrew Burgess
May 30, 2023, 8:46 p.m. UTC
When I proposed my inferior-specific breakpoints patch, two people independently asked: will these breakpoints only be inserted into the relevant inferiors? My answer at that point was, no, that's just not possible given how we manage the breakpoint locations, but this series changes that. But as the inferior specific breakpoints patch hasn't landed yet, this series looks at thread-specific breakpoints. A thread-specific breakpoint only applies to a single global thread-id, and so will only apply for to a single thread in a single inferior. As such, we can limit the locations for a thread-specific breakpoint to just those locations in the inferior containing the thread we are interested in. In the following series patch #6 and #9 are the really interesting ones. Patch #6 makes some pretty significant changes to how we setup breakpoints, which opens the way for #9, which performs the location limiting. Patches #1 to #5 are me just trying to understand the breakpoint creation code more -- adding asserts and making a couple of minor cleanups. Patches #7 and #8 are more cleanups, but now looking at the location creation/re-setting code. --- In v3: - Rebased on to current upstream/master, this includes all Simon's recent breakpoint changes. Retested with no regressions seen. In v2: - Rebased on current upstream/master and retested, - No changes to code or docs. --- Andrew Burgess (9): gdb: create_breakpoint: assert for a valid thread-id gdb: create_breakpoint: asserts relating to extra_string/parse_extra gdb: change 'if' to gdb_assert in update_dprintf_command_list gdb: build dprintf commands just once in code_breakpoint constructor gdb: don't display inferior list for pending breakpoints gdb: parse pending breakpoint thread/task immediately gdb: remove breakpoint_re_set_one gdb: remove tracepoint_probe_create_sals_from_location_spec gdb: only insert thread-specific breakpoints in the relevant inferior gdb/Makefile.in | 2 + gdb/NEWS | 11 + gdb/ada-lang.c | 6 +- gdb/break-catch-throw.c | 6 +- gdb/break-cond-parse.c | 403 +++++++++++ gdb/break-cond-parse.h | 47 ++ gdb/breakpoint.c | 666 ++++++++---------- gdb/breakpoint.h | 64 +- gdb/testsuite/gdb.base/condbreak.exp | 20 +- gdb/testsuite/gdb.base/pending.exp | 23 +- gdb/testsuite/gdb.linespec/explicit.exp | 4 +- gdb/testsuite/gdb.mi/mi-dprintf-pending.exp | 3 +- .../gdb.mi/user-selected-context-sync.exp | 2 +- .../gdb.multi/bp-thread-specific.exp | 7 +- .../gdb.multi/multi-target-continue.exp | 2 +- .../gdb.multi/multi-target-ping-pong-next.exp | 4 +- gdb/testsuite/gdb.multi/pending-bp-lib.c | 22 + gdb/testsuite/gdb.multi/pending-bp.c | 66 ++ gdb/testsuite/gdb.multi/pending-bp.exp | 321 +++++++++ gdb/testsuite/gdb.multi/tids.exp | 6 +- .../gdb.threads/del-pending-thread-bp-lib.c | 22 + .../gdb.threads/del-pending-thread-bp.c | 85 +++ .../gdb.threads/del-pending-thread-bp.exp | 108 +++ 23 files changed, 1498 insertions(+), 402 deletions(-) create mode 100644 gdb/break-cond-parse.c create mode 100644 gdb/break-cond-parse.h create mode 100644 gdb/testsuite/gdb.multi/pending-bp-lib.c create mode 100644 gdb/testsuite/gdb.multi/pending-bp.c create mode 100644 gdb/testsuite/gdb.multi/pending-bp.exp create mode 100644 gdb/testsuite/gdb.threads/del-pending-thread-bp-lib.c create mode 100644 gdb/testsuite/gdb.threads/del-pending-thread-bp.c create mode 100644 gdb/testsuite/gdb.threads/del-pending-thread-bp.exp base-commit: 2bd766d6245bf9db77c42da3537c949ffb814bfc