Message ID | cover.1676901929.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 624D3383FDD7 for <patchwork@sourceware.org>; Mon, 20 Feb 2023 14:14:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 624D3383FDD7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676902461; bh=y50536F9gplIMR9X06gY4YZdMOtPNyPWmUmQKjPjHJw=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=Uf+LPKbP0PnN3lwZ3Z/x9YW/DgPeYt0TaaQXLMcbrTFI0bMFhKPtEX3b0j58psx00 AHe33b3o5EeOMF/G3PnAH+RwUlI0c4J9EfDf3uOQdKdplj+O8N10w35OhQlJNGYY6s nL6TzNvCWqGqzEyCrk5elBx+K8LRhGm1JNkFss5A= 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 1D5B3384182A for <gdb-patches@sourceware.org>; Mon, 20 Feb 2023 14:13:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1D5B3384182A Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-226-o3rwBHcQMYWvtOIwHKMsQw-1; Mon, 20 Feb 2023 09:13:56 -0500 X-MC-Unique: o3rwBHcQMYWvtOIwHKMsQw-1 Received: by mail-wm1-f71.google.com with SMTP id bg22-20020a05600c3c9600b003e209b61ebbso572640wmb.3 for <gdb-patches@sourceware.org>; Mon, 20 Feb 2023 06:13:56 -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:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=y50536F9gplIMR9X06gY4YZdMOtPNyPWmUmQKjPjHJw=; b=ah6sUJn4jccftpjpneE81n1s1zhKp9dsbzdkJpgs9CFbL62JbtoAgrAiPOhoic82GR N90Js6jXgKET+q2iqQBLLwSlyhhAg6ZTVKS1xi05HeRItf12U3kbTAbvaSzQcu2n1SXy 4FPnSLmDOPX57gH3jhrW/PmCyMboCLUzFQH92fdoi+j5eVJk8xD9JelGNt6Rowd4Ns2U enIQTv6kXneyG046Ur087GvR5S5Q5WBZjccO3c1xBpzEae8WFtiFu3I7Dpprdc83wsgO Tcn/Fisxe7ybam/FwcE6puYLBUSg/aHwon+OGs6J49RUo6t2j4ElUwdRxPxfHcI0fOtW 3FWw== X-Gm-Message-State: AO0yUKXZVlVIfPRqOEu2kS+dp0tcoesSbL2ACkqh2eZRk5kKVbkr7hY2 52c80I6xVdJdklgox1j7N427iZ3+vJkNfOSS3pkBAKhnknbrEf/wGEAtVvlAJgJyNGMAI+o+662 Fc6oTbgXE1JdsaXseCnv5GQLWkEzTvNSv+NDTc5tZGh4o1BwttRe/K9CULtwedEEVBoZ0I/9Yy7 znPLI= X-Received: by 2002:adf:decf:0:b0:2c5:98f2:5b1d with SMTP id i15-20020adfdecf000000b002c598f25b1dmr2145435wrn.63.1676902435495; Mon, 20 Feb 2023 06:13:55 -0800 (PST) X-Google-Smtp-Source: AK7set+g2kRkyYU6LasbOXn6Mp2RVX9y9JYvaTv9hBzUZPAn8DThSvbAt6UszHvRyBcjvRlQG7jb6A== X-Received: by 2002:adf:decf:0:b0:2c5:98f2:5b1d with SMTP id i15-20020adfdecf000000b002c598f25b1dmr2145418wrn.63.1676902435155; Mon, 20 Feb 2023 06:13:55 -0800 (PST) Received: from localhost (95.72.115.87.dyn.plus.net. [87.115.72.95]) by smtp.gmail.com with ESMTPSA id o2-20020a5d4742000000b002c59c6abc10sm2146386wrs.115.2023.02.20.06.13.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 06:13:54 -0800 (PST) To: gdb-patches@sourceware.org Cc: Andrew Burgess <aburgess@redhat.com> Subject: [PATCH 0/8] Fix missing MI =breakpoint-deleted notifications Date: Mon, 20 Feb 2023 14:13:45 +0000 Message-Id: <cover.1676901929.git.aburgess@redhat.com> X-Mailer: git-send-email 2.25.4 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.6 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 <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 |
Fix missing MI =breakpoint-deleted notifications
|
|
Message
Andrew Burgess
Feb. 20, 2023, 2:13 p.m. UTC
This series all sprang from a single sentence in this patch review: https://sourceware.org/pipermail/gdb-patches/2023-February/196560.html In this patch (adding inferior specific breakpoints), at one point, I changed a breakpoints number to zero. Pedro asks the very good question: Doesn't this mess up MI breakpoint deleted notifications? Clearly what I wrote was wrong. But, confession: I copied the code in question from the code to handle thread-specific breakpoints. And if Pedro's point was true for my inferior-speicifc b/p, then it must be true for thread-specific b/p too, which means we have a bug. Patch #1 is a trivial drive by clean up. Patch #2 is an interesting issue I ran into relating to the MI output while writing tests for this issue. This patch is worth a review because I'm proposing a slight change to the MI output. Patches #3 to #7 are just testsuite cleanup. There's no GDB changes in here. This is all about making it easier for me to write the tests in the last patch. You can probably skip these if you're short on review time. Patch #8 is the important one. This adjusts how we handle thread-specific breakpoints to avoid the issue Pedro pointed out above. This fix was mostly trivial, except for a nasty knock-on problem in the Python FinishBreakpoints code. --- Andrew Burgess (8): gdb: remove an out of date comment about disp_del_at_next_stop gdb: don't duplicate 'thread' field in MI breakpoint output gdb/testsuite: make more use of mi-support.exp gdb/testsuite: extend the use of mi_clean_restart gdb/testsuite introduce foreach_mi_ui_mode helper proc gdb/testsuite: introduce is_target_non_stop helper proc gdb/testsuite: fix failure in gdb.mi/mi-pending.exp with extended-remote gdb: fix mi breakpoint-deleted notifications for thread-specific b/p gdb/NEWS | 8 + gdb/breakpoint.c | 10 +- gdb/python/py-breakpoint.c | 3 + gdb/python/py-finishbreakpoint.c | 33 ++- gdb/python/python-internal.h | 1 + gdb/testsuite/gdb.base/access-mem-running.exp | 10 +- gdb/testsuite/gdb.base/fork-running-state.exp | 11 +- gdb/testsuite/gdb.mi/mi-break.exp | 17 +- gdb/testsuite/gdb.mi/mi-exec-run.exp | 1 - gdb/testsuite/gdb.mi/mi-multi-commands.exp | 3 +- gdb/testsuite/gdb.mi/mi-nsmoribund.exp | 7 +- gdb/testsuite/gdb.mi/mi-pending.exp | 40 ++- gdb/testsuite/gdb.mi/mi-thread-bp-deleted.c | 88 ++++++ gdb/testsuite/gdb.mi/mi-thread-bp-deleted.exp | 268 ++++++++++++++++++ gdb/testsuite/gdb.mi/mi-thread-specific-bp.c | 44 +++ .../gdb.mi/mi-thread-specific-bp.exp | 49 ++++ gdb/testsuite/gdb.mi/mi-watch.exp | 17 +- gdb/testsuite/gdb.mi/new-ui-mi-sync.exp | 8 +- .../gdb.mi/user-selected-context-sync.exp | 8 +- .../access-mem-running-thread-exit.exp | 10 +- .../gdb.threads/clone-attach-detach.exp | 11 +- .../gdb.threads/detach-step-over.exp | 8 +- gdb/testsuite/gdb.threads/thread-bp-deleted.c | 88 ++++++ .../gdb.threads/thread-bp-deleted.exp | 206 ++++++++++++++ gdb/testsuite/lib/gdb.exp | 19 ++ gdb/testsuite/lib/mi-support.exp | 89 +++++- gdb/thread.c | 2 + 27 files changed, 935 insertions(+), 124 deletions(-) create mode 100644 gdb/testsuite/gdb.mi/mi-thread-bp-deleted.c create mode 100644 gdb/testsuite/gdb.mi/mi-thread-bp-deleted.exp create mode 100644 gdb/testsuite/gdb.mi/mi-thread-specific-bp.c create mode 100644 gdb/testsuite/gdb.mi/mi-thread-specific-bp.exp create mode 100644 gdb/testsuite/gdb.threads/thread-bp-deleted.c create mode 100644 gdb/testsuite/gdb.threads/thread-bp-deleted.exp base-commit: c9802aca6d152c4a47252f69ad81556dbc24e312
Comments
On 2023-02-20 2:13 p.m., Andrew Burgess via Gdb-patches wrote: > This series all sprang from a single sentence in this patch review: > > https://sourceware.org/pipermail/gdb-patches/2023-February/196560.html > > In this patch (adding inferior specific breakpoints), at one point, I > changed a breakpoints number to zero. Pedro asks the very good question: > > Doesn't this mess up MI breakpoint deleted notifications? > > Clearly what I wrote was wrong. But, confession: I copied the code in > question from the code to handle thread-specific breakpoints. And if > Pedro's point was true for my inferior-speicifc b/p, then it must be > true for thread-specific b/p too, which means we have a bug. > > Patch #1 is a trivial drive by clean up. > > Patch #2 is an interesting issue I ran into relating to the MI output > while writing tests for this issue. This patch is worth a review > because I'm proposing a slight change to the MI output. > > Patches #3 to #7 are just testsuite cleanup. There's no GDB changes > in here. This is all about making it easier for me to write the tests > in the last patch. You can probably skip these if you're short on > review time. > > Patch #8 is the important one. This adjusts how we handle > thread-specific breakpoints to avoid the issue Pedro pointed out > above. This fix was mostly trivial, except for a nasty knock-on > problem in the Python FinishBreakpoints code. I read the whole series and replied to a number of patches where I had something to say (though nothing major). Those I didn't reply to LGTM as is. Thanks for doing this. Appreciated.
Pedro Alves <pedro@palves.net> writes: > On 2023-02-20 2:13 p.m., Andrew Burgess via Gdb-patches wrote: >> This series all sprang from a single sentence in this patch review: >> >> https://sourceware.org/pipermail/gdb-patches/2023-February/196560.html >> >> In this patch (adding inferior specific breakpoints), at one point, I >> changed a breakpoints number to zero. Pedro asks the very good question: >> >> Doesn't this mess up MI breakpoint deleted notifications? >> >> Clearly what I wrote was wrong. But, confession: I copied the code in >> question from the code to handle thread-specific breakpoints. And if >> Pedro's point was true for my inferior-speicifc b/p, then it must be >> true for thread-specific b/p too, which means we have a bug. >> >> Patch #1 is a trivial drive by clean up. >> >> Patch #2 is an interesting issue I ran into relating to the MI output >> while writing tests for this issue. This patch is worth a review >> because I'm proposing a slight change to the MI output. >> >> Patches #3 to #7 are just testsuite cleanup. There's no GDB changes >> in here. This is all about making it easier for me to write the tests >> in the last patch. You can probably skip these if you're short on >> review time. >> >> Patch #8 is the important one. This adjusts how we handle >> thread-specific breakpoints to avoid the issue Pedro pointed out >> above. This fix was mostly trivial, except for a nasty knock-on >> problem in the Python FinishBreakpoints code. > > I read the whole series and replied to a number of patches where I > had something to say (though nothing major). Those I didn't reply to LGTM as is. > > Thanks for doing this. Appreciated. I made the changes you suggested and pushed this series. Thanks, Andrew