From patchwork Sat Dec 13 14:37:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schimpe, Christina" X-Patchwork-Id: 126509 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 947E74BA2E28 for ; Sat, 13 Dec 2025 14:39:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 947E74BA2E28 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=eHVdIPDe X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by sourceware.org (Postfix) with ESMTPS id 1EDF44BA2E1E for ; Sat, 13 Dec 2025 14:37:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1EDF44BA2E1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1EDF44BA2E1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=192.198.163.18 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1765636677; cv=none; b=dCmN6h1dVu4U93dYLSQ6Z0TbDMZwgrvKnj16ZGBvtl3nFu8JuJE1Tyr7BZIZhN9OgWEAXREH5byIGnuKS8MKXUKf37z0ZVip5NsKW3gXO/SFoz4vq6Y5AkneLO394PLEnvWINODTXayKMjXmkvJpb/QRXemgCr5yQy6i0bdeV08= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1765636677; c=relaxed/simple; bh=tpVzp4UyXHkBwIZbZu7K07fEy47LbEFjDwc497KP/+Q=; h=DKIM-Signature:MIME-Version:From:To:Subject:Date:Message-Id: MIME-Version; b=D2PeAt1xTszx6nlWYKHCYqC+28jwQOS4C5fh4BQrJMefwLpmy2a4Yu3SA2clJcyfEJn1MwLytjTEBCGA89armVH0OJMAKEGbSIO+dXQQMJoheUwHcp0uoKvszp+e5+jNuD2tQNU5br9/peDGetBkJeRe/HeCiN4sExNrmYOFciQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1EDF44BA2E1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1765636672; x=1797172672; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=tpVzp4UyXHkBwIZbZu7K07fEy47LbEFjDwc497KP/+Q=; b=eHVdIPDeQSrmwFJtE/qzI5lwRJNSiBlT/lLYdAZfMoo/7JxsmJOaYg1Z BbIpqE3HS0NXsWzhAZWgjlTky8pOHMN9EY/AvYl2nWAwCqE0HnsWcLEWn I6vB8V6xAyHWxJgKcFj1vlqxE0DNKUJFYOwjoXCaftmVrphdLoycDu5n8 YzCOirsuhPEDxOApv6KeLVbzIkQn3PYXKQJYAj2slMO32GcjRnjfOsa98 1WGmAuIpCEkBF+pwyU2MPUhacduI2puHYhP/4fiBRIweKnoke0D+5iwXB 96jXgST3UbphLHDuVmhxpUWQAzGi5QtygijRzCkM/b4o9X5d2TNTVcWyx Q==; X-CSE-ConnectionGUID: +ZbCWRqZRpeKGRp67XEvCw== X-CSE-MsgGUID: Y/M3tpLoQ0qrmNqR7lGobw== X-IronPort-AV: E=McAfee;i="6800,10657,11641"; a="66784662" X-IronPort-AV: E=Sophos;i="6.21,146,1763452800"; d="scan'208";a="66784662" MIME-Version: 1.0 Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2025 06:37:51 -0800 X-CSE-ConnectionGUID: 1nmWYTulRbiENe57XQqF1w== X-CSE-MsgGUID: PK+r8CY1QvejQxRBkfgaAw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,146,1763452800"; d="scan'208";a="201502351" Received: from gkldtt-dev-004.igk.intel.com (HELO localhost) ([10.123.221.202]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2025 06:37:49 -0800 From: Christina Schimpe To: gdb-patches@sourceware.org Cc: klaus.gerlicher@intel.com, guinevere@redhat.com Subject: [PATCH v4 3/6] gdb, cli: pass the argument of a set command to its callback. Date: Sat, 13 Dec 2025 14:37:06 +0000 Message-Id: <20251213143709.301799-4-christina.schimpe@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251213143709.301799-1-christina.schimpe@intel.com> References: <20251213143709.301799-1-christina.schimpe@intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, HTML_MESSAGE, RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_NONE, TXREP, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org From: Natalia Saiapova This might be useful, if some commands need to have a special case if run w/o arguments. I am going to use it in gdb: refine commands to control scheduler locking. to keep the old behaviour of the set scheduler-locking step which should set both set scheduler-locking step on set scheduler-locking replay step on To do this, the set-command needs to detect that it was issued without arguments and have a special handling for this. Without the special handling, the command set scheduler-locking step would set only set scheduler-locking step on --- gdb/cli/cli-setshow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c index a97cd1b392b..feca27c8c75 100644 --- a/gdb/cli/cli-setshow.c +++ b/gdb/cli/cli-setshow.c @@ -456,7 +456,7 @@ do_set_command (const char *arg, int from_tty, struct cmd_list_element *c) error (_("gdb internal error: bad var_type in do_setshow_command")); } - c->func (NULL, from_tty, c); + c->func (arg, from_tty, c); if (notify_command_param_changed_p (option_changed, c)) {