From patchwork Fri Jan 20 09:46:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 55422 Return-Path: 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 05C433858000 for ; Fri, 20 Jan 2023 09:47:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 05C433858000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1674208033; bh=wDOnBlV7Ql+X1e7cO9vMP4q0WO2o5gZcAhCbIMhJBcg=; 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=tuhcGBb9xzxLK5W2Vvx3D8weMqJOZWaDALuUktHSgOpBwW1MGPSQceQ8jfqvBWqnb WkXKdOsYJBuVavFj6/IN3nXJBFkW520WTKIFkVgC63X70/AHu5bA2EygJ9IjuYG9rG t1hA6RgD/okpxAS3BAV8BsWaFDbZaKMMkSoBcVtQ= 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.129.124]) by sourceware.org (Postfix) with ESMTPS id B65823858417 for ; Fri, 20 Jan 2023 09:46:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B65823858417 Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-669-rz0WERoJMQ6E7eDs9FFgUg-1; Fri, 20 Jan 2023 04:46:35 -0500 X-MC-Unique: rz0WERoJMQ6E7eDs9FFgUg-1 Received: by mail-qt1-f197.google.com with SMTP id q26-20020ac8735a000000b003b63165d87cso2180255qtp.11 for ; Fri, 20 Jan 2023 01:46:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=wDOnBlV7Ql+X1e7cO9vMP4q0WO2o5gZcAhCbIMhJBcg=; b=eP9bAShvynf8V4M5YDB5ADyS/9cp4gccLp419WGAdLP40IGWuQiv86oH/FFh6y1RJV qeudjj+u9/dy7NLnDDv0fkhLhWZ4S2L849XLWVNzXQs3yPd9254Dak4n6VpxFuRV5zMz MFDI2wDlYszcjiZa2MKxDDBFe+OfsWRUmqsf9NBlmvpNkPpGNWw5GtVUMyxoiVk0EsPq wg69dmXhmbdLo9+B8fs7+UJhb1uEdQhsqPy4Bf6m7evQtAYgFdkHKAipjxfu3v9pJfXa hgeVuL8ewfhSVM8Dh891hRsW+PEcbAIzoBIv4ydfNGjKOZ/2nkJyZdBJjSqo4AB7NDXZ bQnw== X-Gm-Message-State: AFqh2kp6ZFIUP0AeFR/vYsaGOPj1WEpkcfwroVBcHqVdiqJhqJCdz3IP Q1wI1zzc0bslWGb3ecHEbB7NW3rR/Vrb9a43z9FMzE0t+GtYkKiH8XRV8Gn61SCcuC8ng/938XE aHvYJStYiGPr39qNDMwTJHWpU6bwZ/8DSGNoV9xIHMpkcXD6kGWVhpmFknWjQGRQDFRbF+CFKBw == X-Received: by 2002:a05:6214:5142:b0:534:cfeb:5dec with SMTP id kh2-20020a056214514200b00534cfeb5decmr21424237qvb.24.1674207995105; Fri, 20 Jan 2023 01:46:35 -0800 (PST) X-Google-Smtp-Source: AMrXdXu+vDkG4U0NjS3mXXdW4um4b3reBkumjEu9oPsLrEf0GR5TMCwjXWYZz0XqJefvGYJmkytUrw== X-Received: by 2002:a05:6214:5142:b0:534:cfeb:5dec with SMTP id kh2-20020a056214514200b00534cfeb5decmr21424213qvb.24.1674207994753; Fri, 20 Jan 2023 01:46:34 -0800 (PST) Received: from localhost (95.72.115.87.dyn.plus.net. [87.115.72.95]) by smtp.gmail.com with ESMTPSA id u12-20020a05620a430c00b006ee949b8051sm25628088qko.51.2023.01.20.01.46.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Jan 2023 01:46:34 -0800 (PST) To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv2 0/6] Inferior specific breakpoints Date: Fri, 20 Jan 2023 09:46:23 +0000 Message-Id: X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Andrew Burgess via Gdb-patches From: Andrew Burgess Reply-To: Andrew Burgess Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" Thanks for all the feedback on v1. Changes in v2: - Biggest changes are in patch #3, as suggested by Baris, I've now removed the 'thread' and 'inferior' tags from the end of each location in the 'info breakpoints' output. The information was already available in the condition line, so this removes some duplication. For Ada task conditions I've added a condition line as this was missing. - Doc updates in #4 and #5 to fix the issues Eli pointed out. These all seemed pretty minor so I don't think there should be anything too surprising there. - Updated patch #5 based on feedback from Baris, this was all pretty minor stuff though, formatting, and rewording some error messages, - Updated patch #6 based on feedback from Baris, this is a minor test cleanup. Thanks, Andrew --- Andrew Burgess (6): gdb/remote: announce thread exit events for remote targets gdb/testsuite: don't try to set non-stop mode on a running target gdb: fix display of thread condition for multi-location breakpoints gdb: error if 'thread' or 'task' keywords are overused gdb: add inferior-specific breakpoints and watchpoints gdb: convert the 'start' breakpoint to use inferior keyword gdb/NEWS | 16 ++ gdb/breakpoint.c | 210 ++++++++++++++---- gdb/breakpoint.h | 10 +- gdb/doc/gdb.texinfo | 74 +++++- gdb/doc/python.texi | 24 +- gdb/dummy-frame.c | 1 + gdb/elfread.c | 5 +- gdb/guile/scm-breakpoint.c | 5 + gdb/infcmd.c | 10 +- gdb/inferior.h | 11 + gdb/infrun.c | 2 + gdb/linespec.c | 4 +- gdb/python/py-breakpoint.c | 77 +++++++ gdb/remote.c | 4 + gdb/testsuite/gdb.ada/tasks.exp | 19 +- gdb/testsuite/gdb.base/save-bp.exp | 2 +- .../gdb.base/start-inferior-specific-1.c | 32 +++ .../gdb.base/start-inferior-specific-2.c | 22 ++ .../gdb.base/start-inferior-specific.exp | 55 +++++ gdb/testsuite/gdb.base/thread-bp-multi-loc.c | 44 ++++ .../gdb.base/thread-bp-multi-loc.exp | 72 ++++++ gdb/testsuite/gdb.linespec/cpcompletion.exp | 4 +- gdb/testsuite/gdb.linespec/explicit.exp | 1 + gdb/testsuite/gdb.linespec/keywords.exp | 10 +- .../gdb.multi/inferior-specific-bp-1.c | 52 +++++ .../gdb.multi/inferior-specific-bp-2.c | 52 +++++ .../gdb.multi/inferior-specific-bp.exp | 182 +++++++++++++++ gdb/testsuite/gdb.python/py-breakpoint.exp | 43 ++++ .../gdb.threads/thread-specific-bp.exp | 142 ++++++------ gdb/testsuite/gdb.threads/watchthreads2.exp | 3 + gdb/testsuite/lib/completion-support.exp | 2 +- 31 files changed, 1041 insertions(+), 149 deletions(-) create mode 100644 gdb/testsuite/gdb.base/start-inferior-specific-1.c create mode 100644 gdb/testsuite/gdb.base/start-inferior-specific-2.c create mode 100644 gdb/testsuite/gdb.base/start-inferior-specific.exp create mode 100644 gdb/testsuite/gdb.base/thread-bp-multi-loc.c create mode 100644 gdb/testsuite/gdb.base/thread-bp-multi-loc.exp create mode 100644 gdb/testsuite/gdb.multi/inferior-specific-bp-1.c create mode 100644 gdb/testsuite/gdb.multi/inferior-specific-bp-2.c create mode 100644 gdb/testsuite/gdb.multi/inferior-specific-bp.exp base-commit: 1a4cbc46d66812121ef359b1b0e954f4373ea8d0