From patchwork Tue Jul 9 15:04:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Saiapova, Natalia" X-Patchwork-Id: 93598 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 56D01386C5B4 for ; Tue, 9 Jul 2024 15:06:11 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by sourceware.org (Postfix) with ESMTPS id E4955386D607 for ; Tue, 9 Jul 2024 15:05:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E4955386D607 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 E4955386D607 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=1720537537; cv=none; b=fsxwouTVF6EjshA4PUc6bsWKJoo7Iv1ZN/7ZmUR4GnOyPkwbQIm2X6H8f3MOdk68NGryuJ2HYhTM7/B3ibV/QrlRbZ1cxrE7lPvpKGjX6sXe/7atGq4BP2ENNflmcmEOfMZNarxjMe+1b3g8gOBXwdrbQDHVvKsmuWMgXNe0JHU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720537537; c=relaxed/simple; bh=Fyg2CtqLPLSq7tlS2Np4B4bUlRHHNExKaltxEjVgsew=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=lfCfGuUPWFDvmCMefqUHX4b4OcYa6EaXZ9FCvLLcIHZMXVfsuXzzqlAT2tn7oBqa5aLN7FjdriWv8gP4Q8VZ1+Fvs34/AhIBnmXxzfF3hgLsV6TzeTBNYNxrUCrBazV8DzAl6IWg8M7SfnipLFKuHk+vPrazN8RQbhsJ/ER8H7w= 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=1720537534; x=1752073534; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=Fyg2CtqLPLSq7tlS2Np4B4bUlRHHNExKaltxEjVgsew=; b=O3uw7zsfPv3+adZHXLXOlu4Yfl7lgsqeHryO6GSqn8KywO+vnTYGy8nu Xj0ilFymG9RdyI0sRFjZ7XGj29jkRPqFt7OUJtSDlR51OufuJo1m400GS TeOYWRe0+/CnZ+q5daVjnnamXsmFlVebDZ7AgBaC3Dxa/JQUrVQ3YRuTl XAQ9GVH5S2aFyC9RqMmeXhOBWpD3fbbGY5QUWPfkzNHapduTFVfL51yNQ E3i7LoqSBdmuJQSOqhJStm4ZFJgPW8LRMbIRdRR8x7i4Up//Wf+Kk+VhI OFusfwFo9GiFPu1wac6kHGzSfIG07mdf98eZPrV7Cc2ExcRyvuNf+DmIq g==; X-CSE-ConnectionGUID: AgESBb+fTUCc6W7tjBl/pw== X-CSE-MsgGUID: +EQfdCKBQn2ODQv3y2fL9Q== X-IronPort-AV: E=McAfee;i="6700,10204,11128"; a="21567399" X-IronPort-AV: E=Sophos;i="6.09,195,1716274800"; d="scan'208";a="21567399" 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:33 -0700 X-CSE-ConnectionGUID: tK9GwPvFSEqaD3ULGvtFqg== X-CSE-MsgGUID: eAlTleFPTGOQHPamc4QZnQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,195,1716274800"; d="scan'208";a="52184597" 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:32 -0700 From: Natalia Saiapova To: gdb-patches@sourceware.org Subject: [PATCH v2 2/6] gdb, cli: remove left-over code from "set_logging_on". Date: Tue, 9 Jul 2024 15:04:06 +0000 Message-Id: <20240709150410.34624-3-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 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 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 This is a refactoring. Remove the left-over code, which rewrites the logging filename in "set logging on" command. The code became unused after the deprecation of "set logging (on|off)" command. Before the deprecation, the command could also take a file name and rewrite the logging file, e.g.: (gdb) set logging on lalala Copying output to lalala. Copying debug output to lalala. After the command was deprecated and reimplemented as an alias to "set logging enable on", additional input after "on" became invalid: (gdb) set logging on lalala Warning: 'set logging on', an alias for the command 'set logging enabled', is deprecated. Use 'set logging enabled on'. "on" or "off" expected. (gdb) set logging on lalala "on" or "off" expected. (gdb) set logging enable on lalala "on" or "off" expected. (gdb) set logging enable on Copying output to gdb.txt. Copying debug output to gdb.txt. Approved-By: Tom Tromey --- gdb/cli/cli-logging.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/gdb/cli/cli-logging.c b/gdb/cli/cli-logging.c index 2c54ceafb3e..4886bf2eed1 100644 --- a/gdb/cli/cli-logging.c +++ b/gdb/cli/cli-logging.c @@ -159,11 +159,6 @@ handle_redirections (int from_tty) static void set_logging_on (const char *args, int from_tty) { - const char *rest = args; - - if (rest && *rest) - logging_filename = rest; - handle_redirections (from_tty); }