From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by sourceware.org (Postfix) with ESMTPS id DE0EA38449CB for ; Tue, 9 Jul 2024 15:05:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DE0EA38449CB 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 DE0EA38449CB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=198.175.65.15 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720537547; cv=none; b=svHKbEBZ00JkLOunEQUU4HJxOqM7WZddXYd7wqhI4rSxb0t2bmQO8wWuuPrpUWaomcqdFdh2jhkjxjwZE1v1671njZ+m6tIJ9GaRjo2SjjK6V452M1VbJf8Yrw6d8C39JEy8AMlS399rvr81/H6soZI80x5kNKMfFdUe3IOE7JI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720537547; c=relaxed/simple; bh=0TJ3eKjRuE4eb47jemiR1Niq6OdkKLq+gCs/Q5/q60A=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=DPsXjEsmj9UZLRTGJgYvTEiMzmh/ZPpZRsXx3bRFOjrH5m0RLbk9FS4Z0AibgZw9qgJnQwXOO6kBgmg5MIHOuc/QZPA6LlDonPZLDSDPpNUfZqZ1Q8qYNK40N5WFwgDOAgtWGgVMbjke0DrYB1sNhNaAB/8j5TdscIs+fxRh9I0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1720537545; x=1752073545; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=0TJ3eKjRuE4eb47jemiR1Niq6OdkKLq+gCs/Q5/q60A=; b=XkJqDXDNI6CaJgJiEmNT3Fyq5xGqs8rSZUE8VBIs2A8fVFkZLevbue1B mNTqy+9ugmYDup2QfqS+RQIvS66rfBF9mUN0oKHX4g+UZtqheEK6tXCqH NAFK8iM86KmqgyLMhZ4ZU5Vpa8YwMsGtPZNQqlvHuYjpeVkDO9vCAu5LV Eh4aCdYidW+B0BTduOUJVW5bXdO2to+Z2i6yE9qWZXTQ6U7495g29On2d tDR5oaVkocnkhUI0pJEVHfDt79TqJ21HLNwFeZkPvXo40GFCZ+s/zFGwj Ho1MeiWozemmpr7f+6mSSrothddZkVzT/L4wRqvQJBR6IFLcLvJpdY143 w==; X-CSE-ConnectionGUID: DJF2HRgOTA+8PRo0ERkPkQ== X-CSE-MsgGUID: vwD4Vum5TVGTYgKM3184Sw== X-IronPort-AV: E=McAfee;i="6700,10204,11128"; a="21567419" X-IronPort-AV: E=Sophos;i="6.09,195,1716274800"; d="scan'208";a="21567419" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jul 2024 08:05:43 -0700 X-CSE-ConnectionGUID: d9A6O9uCQtKtfYxm3dmhPg== X-CSE-MsgGUID: wFe0bo7qQb6BwTFuqsttQA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,195,1716274800"; d="scan'208";a="52184610" Received: from dut1061atsm.igk.intel.com (HELO localhost) ([10.211.177.242]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jul 2024 08:05:43 -0700 From: Natalia Saiapova To: gdb-patches@sourceware.org Subject: [PATCH v2 3/6] gdb, cli: pass the argument of a set command to its callback. Date: Tue, 9 Jul 2024 15:04:07 +0000 Message-Id: <20240709150410.34624-4-natalia.saiapova@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240709150410.34624-1-natalia.saiapova@intel.com> References: <20240709150410.34624-1-natalia.saiapova@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,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 List-Id: 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 bcc793b3148..9f3a294cca1 100644 --- a/gdb/cli/cli-setshow.c +++ b/gdb/cli/cli-setshow.c @@ -447,7 +447,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)) { -- 2.25.1 Intel Deutschland GmbH Registered Address: Am Campeon 10, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Sean Fennelly, Jeffrey Schneiderman, Tiffany Doon Silva Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928