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 331B53858D33 for ; Fri, 20 Jan 2023 13:25:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 331B53858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pIrOp-0003Md-EF; Fri, 20 Jan 2023 08:25:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ahQpww3bGVFwqfqs5ldNaELLo20uaRVwgKBBLRT2mFk=; b=rKniyMXkaYnx brwbxdA4nvS6UtNoLaQMj0sUhdHcqdcIT5HknKhvsRW0tXloBzbMXnblQciV4l0tXhpPM4P2nPHYB pIQ09MNRrhHxc1Zpt4+C3+REmjPF0//Wo2k5GETFrwUAcNkqVWUuBR3QG6ikxVe389ryDKVk6JOpB dwMOwMXVr5BEmUpShd6pu+8QY2yFnyk6utZj6KW+Yy4H9zHHvvNxyOzeNeinMTCWwOYiLWXVL+5ne gJnZ+YfIVVOi+H9l5OULtb+7qAemu7JfJwWWC+YoVdVusP+M6O6+uF+LgLT3zhPgZrf1nnUu/gPGd 5ZmKVitFphG94Lhq5YVvlw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pIrOn-0004T4-Gy; Fri, 20 Jan 2023 08:25:43 -0500 Date: Fri, 20 Jan 2023 15:25:42 +0200 Message-Id: <834jslnxrd.fsf@gnu.org> From: Eli Zaretskii To: Andrew Burgess Cc: gdb-patches@sourceware.org In-Reply-To: <050da90b0b8c886983ec472a957b1075d4ecf7d6.1674207665.git.aburgess@redhat.com> (message from Andrew Burgess via Gdb-patches on Fri, 20 Jan 2023 09:46:28 +0000) Subject: Re: [PATCHv2 5/6] gdb: add inferior-specific breakpoints and watchpoints References: <050da90b0b8c886983ec472a957b1075d4ecf7d6.1674207665.git.aburgess@redhat.com> X-Spam-Status: No, score=1.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_BARRACUDACENTRAL,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > Cc: Andrew Burgess > Date: Fri, 20 Jan 2023 09:46:28 +0000 > From: Andrew Burgess via Gdb-patches > > This commit extends the breakpoint mechanism to allow for inferior > specific breakpoints (and watchpoints). > > As GDB gains better support for multiple connections, and so for > running multiple (possibly unrelated) inferiors, then it is not hard > to imagine that a user might wish to create breakpoints that apply to > any thread in a single inferior. To achieve this currently, the user > would need to create a condition possibly making use of the $_inferior > convenience variable, which, though functional, isn't the most user > friendly. > > This commit adds a new 'inferior' keyword that allows for the creation > of inferior specific breakpoints. > > Like thread specific breakpoints, the inferior specific breakpoints > are automatically deleted once the inferior in question exits. > --- > gdb/NEWS | 7 + > gdb/breakpoint.c | 171 +++++++++++++--- > 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/inferior.h | 11 ++ > gdb/infrun.c | 2 + > gdb/linespec.c | 4 +- > gdb/python/py-breakpoint.c | 77 ++++++++ > gdb/testsuite/gdb.linespec/cpcompletion.exp | 4 +- > gdb/testsuite/gdb.linespec/explicit.exp | 1 + > .../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/testsuite/lib/completion-support.exp | 2 +- > 19 files changed, 680 insertions(+), 47 deletions(-) > 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 Thanks, the documentation parts are OK.