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 488B33858D32 for ; Mon, 15 Apr 2024 14:41:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 488B33858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 488B33858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713192101; cv=none; b=VKm33F8lVtIcTsKjlnhYaL6REs5XFb1Y/PwRltVOywhZUtxAzbcC+UK01isl1/Ea4JbFXGMuJ37diQVdj96VYtHSolONOzuq2Cm3QmF8vB6dT9CBT3ITowzTsR8PV8l63kp/YlR0OgLuF85lpfz3QR9Z3YCEK49KMAB5kjKpw5w= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713192101; c=relaxed/simple; bh=XT+I7AfycWjg5oivrNyey/B/38gDyR9d71YFsiBbeMQ=; h=DKIM-Signature:Date:Message-Id:From:To:Subject; b=PTNm51JntItCOG+aHGfwJPzzChhKWOfb6YVSNjGLMJadPKAtLDH/tVWT+6PU6ToJO6eJ3lnFCrwq2pg9azkrgtvFNpSwzSaFgLNVyJjnR4xwjv5Xiy2N8nLAQyQnlVLynU8il8Z+jy8e0l9tegeXldnEjiIkaM0X5qM3mLdzzDY= ARC-Authentication-Results: i=1; server2.sourceware.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 1rwNWd-0008IM-QB; Mon, 15 Apr 2024 10:41:39 -0400 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=AaFnXxxGGTMO6HlGY4hGH6k7vuUZsSfm7Gcs+veSor4=; b=lTnLLu9vMScR 9M9IIn1lRHx4zoTkXvgH21tU642Fm0b8BWIWUos5MoOtKQ5m433v0BtWUPP/VbQBjq52y4MbtQXh0 SuCTv7pOiq/1vfP1/PUBeYO6ll4ZM+4Y8iWW51WiMzRtTcbbxvjCa03z+1b7YycnivwFwH5zRiFvN 0NuRk/dWLAwmVD3kfdorzneaQ/iN0lowaBQnc9Fcp/t/s2QKCewWnRQQhXrUP8JsBukEdUAH04a/P 37HAcNaub27odNY3XFg8b0bAPnXNFcuxNJEcvtkg5zrq1XaFPVGTnM7dKqQsmOHuXZRPRi4rr0m9p 0YwPi1k0R+qD+7scuSxCuw==; Date: Mon, 15 Apr 2024 17:41:11 +0300 Message-Id: <8634rmlmd4.fsf@gnu.org> From: Eli Zaretskii To: Andrew Burgess Cc: gdb-patches@sourceware.org In-Reply-To: <4f18fd17db2a5c6f39fa8b8587e3a5fe8fe75379.1713190701.git.aburgess@redhat.com> (message from Andrew Burgess on Mon, 15 Apr 2024 15:19:28 +0100) Subject: Re: [PATCH 3/3] gdb/record: minor clean, remove some unneeded arguments References: <4f18fd17db2a5c6f39fa8b8587e3a5fe8fe75379.1713190701.git.aburgess@redhat.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS,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: > From: Andrew Burgess > Cc: Andrew Burgess > Date: Mon, 15 Apr 2024 15:19:28 +0100 > > I spotted that the two functions: > > record_full_open_1 > record_full_core_open_1 > > both took two arguments, neither of which are used. > > I stumbled onto this while reviewing how filename_completer is used. > The 'record full restore' command uses filename_completer and invokes > the cmd_record_full_restore function. > > The cmd_record_full_restore function calls core_file_command and then > record_full_open, which then calls one of the above functions. > > As 'record full restore' takes a filename, this is passed to > cmd_record_full_restore, which forwards the filename to both > core_file_command and record_full_open. However, record_full_open > never actually uses the filename that is passed in. > > The record_full_open function is also used for 'target record-full'. > > I propose that record_full_open should no longer expect to see any > user supplied arguments passed in (it doesn't use any). In fact, I've > added a check that if we do get any user supplied arguments we'll > throw an error. > > Now that we know record_full_open isn't being passed any user > arguments we can stop passing the arguments to record_full_open_1 and > record_full_core_open_1, this will make no user visible difference as > these arguments were not used. > > It is possible that a user was previously doing: > > (gdb) target record-full blah blah blah > > And this previously would work fine, the 'blah blah blah' was > ignored. Now this will give an error. Other than this case there > should be no user visible changes after this commit. > --- > gdb/NEWS | 4 ++++ > gdb/record-full.c | 15 +++++++----- > gdb/testsuite/gdb.base/record-full-error.exp | 24 ++++++++++++++++++++ > 3 files changed, 37 insertions(+), 6 deletions(-) > create mode 100644 gdb/testsuite/gdb.base/record-full-error.exp OK for the NEWS part, thanks. Reviewed-By: Eli Zaretskii