From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id DE8533858D39 for ; Tue, 16 Apr 2024 14:12:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DE8533858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DE8533858D39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713276734; cv=none; b=fODZ8x9xFnihxbIQJIAQUCFPjWMLXppuB9hRZVemSb3TXCwI4/mn9qNGHvTrMOS1Tt7WxpEJoUHuG55v5HSUM7QQO+epu4fJkQzeEN3JqoH7c254HgtQnmUZQGRNkMDfRnQEo2ziWumdW8twcLyQZl7daCajpenklvrh0onNRKI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713276734; c=relaxed/simple; bh=dlzp6Vv2jtYjXOVlQ9OzVuumcPIzzWHyN1BiuNt123Q=; h=DKIM-Signature:Message-ID:Date:MIME-Version:From:Subject:To; b=tuFKXV3+NVtw/nzJV3td4g9xCl2wF3rNjIKX3T7Jga5Q5UX/FsOC6DEXjDSFvLvZq18bkueB1U6+ZhpaBbEgJKknNUYKpDVdzCeQN5/lJTOig86ORcatkjRSsYEVsymJ6ycF9FDAbf1njJUfoK4ew9V/stex8g0fpsNMHKUMzvA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1713276731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/aRTc74EHyy+hTpuwA5ofpQEpeiJS+7uv+AVcjdwWXg=; b=dKXt/r4zLAxFfzDlgWRkszX4aHltIsuCwzNEmQDxWPbSSrZOG97T4B4WvKeetErSpvshti LVGk3Yzpi9WJhCOlITGT7TgwZT1QKwNPFB6xuytDgrnBVOt9WcIb0p1qaEfmNq6ntjWqdm phGhlyklL6J3WEDcR6BFDphKQBN0wAY= Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-677-VnOwSkhmO9KPdVqqZg8Oig-1; Tue, 16 Apr 2024 10:12:10 -0400 X-MC-Unique: VnOwSkhmO9KPdVqqZg8Oig-1 Received: by mail-pg1-f199.google.com with SMTP id 41be03b00d2f7-5dcbb769a71so4475622a12.3 for ; Tue, 16 Apr 2024 07:12:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713276729; x=1713881529; h=content-transfer-encoding:in-reply-to:content-language:references :to:subject:from:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/aRTc74EHyy+hTpuwA5ofpQEpeiJS+7uv+AVcjdwWXg=; b=hD2tkYRcEJIr5TGqXjcEQFy280WLbp+Y2I7CZNdqAAWlLjJTKukVopgPHFpglCTeVO mPdixg5HYEpFDCDiIe8DuVBt3BBp+mtiXt8HguPS+VadNUNffzAMcCl6eD/QKSb6R4HO 1LLiFTJtejc4/TAOjPcDys4OWXyui5qPCqb+QG9/2pvKBEWGct1UVjqa0d5caCHKH4cG jjT33SswEEnrFjOdCDF/NcpDD9rnTrUnE9Vis4/vQsVtjonUI+8b56Slmg3aNZq6m6Bg vAqcM9PwibJyNN7B+keRwwzP6B1oFP4u7xu1x8UFxjlvuLzx/9X8g7SwaxBlJ2osqRLX taGg== X-Forwarded-Encrypted: i=1; AJvYcCXKYsbThXxpO6Zp8YOzHi9H2xZXhzzOtZBL3gzjmzeRf2qTyv32bEvKbnsiG4qty4useuXxlr3UOBYk16N7my2SC+MLXmtFTXDGtw== X-Gm-Message-State: AOJu0Yw/pgZwgOSptUrKKAK5mwUNGKqIARMP8WNc75Xm6dWJXdylHgm6 ZyegCAQMuEVA5i8IRlw7/nkg/S984kIw/dFHSDGuSvVDl5ltnUwADUvCGMyM6ZBOcbLvDf/8+Zr m7FezgO5hCiT8QAtW8ZkIZVxU1JuP0rL+84PKX1Tue78qpimkWDP7I/2moNw= X-Received: by 2002:a17:903:2292:b0:1e5:c06b:3330 with SMTP id b18-20020a170903229200b001e5c06b3330mr13597338plh.24.1713276728904; Tue, 16 Apr 2024 07:12:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG0V2FeI90Oi/o8L5aDonChCP6uoLPbEycOy55NfInU780bBeJaDfBq8QDL8RV77eFvxGvREQ== X-Received: by 2002:a17:903:2292:b0:1e5:c06b:3330 with SMTP id b18-20020a170903229200b001e5c06b3330mr13597311plh.24.1713276728493; Tue, 16 Apr 2024 07:12:08 -0700 (PDT) Received: from [150.1.200.12] ([71.212.146.31]) by smtp.gmail.com with ESMTPSA id l8-20020a170902f68800b001e2814e08b9sm9825391plg.32.2024.04.16.07.12.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Apr 2024 07:12:08 -0700 (PDT) Message-ID: <1f14b822-2781-422e-8233-34eb894ea5c6@redhat.com> Date: Tue, 16 Apr 2024 07:12:06 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Keith Seitz Subject: Re: [PATCH 3/3] gdb/record: minor clean, remove some unneeded arguments To: Andrew Burgess , gdb-patches@sourceware.org References: <4f18fd17db2a5c6f39fa8b8587e3a5fe8fe75379.1713190701.git.aburgess@redhat.com> In-Reply-To: <4f18fd17db2a5c6f39fa8b8587e3a5fe8fe75379.1713190701.git.aburgess@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,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: On 4/15/24 07:19, Andrew Burgess wrote: > I spotted that the two functions: > > record_full_open_1 > record_full_core_open_1 > > both took two arguments, neither of which are used. Nice catch. I've looked over this series, and I just have one really trivial -- if not silly -- comment. > diff --git a/gdb/record-full.c b/gdb/record-full.c > index 4c3667f48ba..4ef85b0cdb6 100644 > --- a/gdb/record-full.c > +++ b/gdb/record-full.c > @@ -957,11 +957,14 @@ static void record_full_init_record_breakpoints (void); > /* Open the process record target. */ > > static void > -record_full_open (const char *name, int from_tty) > +record_full_open (const char *args, int from_tty) > { > if (record_debug) > gdb_printf (gdb_stdlog, "Process record: record_full_open\n"); > > + if (args != nullptr) > + error (_("trailing junk: '%s'"), args); > + > record_preopen (); > > /* Reset */ While I am no fan of this type of error, I understand the motive in terms of consistency. Grep'ping for this string in gdb gives numerous wordings of this type of error: ada-lang.c: error (_("Junk at end of expression")); ada-lang.c: error (_("Junk at end of arguments.")); break-catch-exec.c: error (_("Junk at end of arguments.")); break-catch-fork.c: error (_("Junk at end of arguments.")); break-catch-throw.c: error (_("Junk at end of arguments.")); breakpoint.c: error (_("Junk at end of expression")); breakpoint.c: error (_("Junk at end of expression")); breakpoint.c: error (_("Junk after thread keyword.")); breakpoint.c: error (_("Junk after inferior keyword.")); breakpoint.c: error (_("Junk after task keyword.")); breakpoint.c: error (_("Junk at end of arguments.")); breakpoint.c: error (_("Junk after thread keyword.")); breakpoint.c: error (_("Junk after task keyword.")); breakpoint.c: error (_("Junk at end of command.")); breakpoint.c: error (_("Junk at end of arguments.")); breakpoint.c: error (_("Junk at end of arguments.")); btrace.c: error (_("Junk after argument: %s."), arg); linespec.c: error (_("Junk at end of line specification: %s"), string); linespec.c: error (_("Junk at end of line specification: %s"), string); parse.c: error (_("Junk after end of expression.")); psymtab.c: error (_("Junk at end of command")); record-btrace.c: error (_("Trailing junk: '%s'."), args); record-btrace.c: error (_("Trailing junk: '%s'."), args); record-btrace.c: error (_("Trailing junk: '%s'."), args + l2); record-btrace.c: error (_("Trailing junk: '%s'."), args + l1); record-btrace.c: error (_("Trailing junk: '%s'."), args); record.c: error (_("Junk after argument: %s."), arg); record.c: error (_("Junk after argument: %s."), arg); record.c: error (_("Junk after argument: %s."), arg); symfile.c: error (_("Junk after %s"), argv[1]); symfile.c: error (_("Junk after %s"), argv[0]); symmisc.c: error (_("Junk at end of command")); symmisc.c: error (_("Junk at end of command")); So i guess as far as the record feature goes, the error message should at least be "Trailing junk: %s". [Yeah, that is one heck of a silly nit, isn't it?] Otherwise, LGTM. Keith