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 8B02B3858D32 for ; Sat, 11 Feb 2023 02:13:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8B02B3858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676081618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jylYq4dGxgmx4olihnRm2oNsqvEeHR3YMzfaExqOHvA=; b=isgI+/Nu7o31m5Bh5cVwMxrdSOEJd5OqQuLtAVGYSSEfsdiO7L7ahA0+fPTxKybhWNDR2S LG5wzTWk0QnYtNVwzvKLu4hwnDN9bh+v0VlYFiHckFzUtDV2rxkk3zmon+8GulGtb+JqOX e7vaPViqpYyOujNebsdvUGbwq0FV0K8= Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-649-DVXHpnkXPqO4qh_92a6_lw-1; Fri, 10 Feb 2023 21:13:37 -0500 X-MC-Unique: DVXHpnkXPqO4qh_92a6_lw-1 Received: by mail-pf1-f197.google.com with SMTP id h11-20020a056a00230b00b00593b9e6ee79so3445099pfh.8 for ; Fri, 10 Feb 2023 18:13:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jylYq4dGxgmx4olihnRm2oNsqvEeHR3YMzfaExqOHvA=; b=DbXpooBlCPkYccfEGGQbT9jiSRJqsV2Moumnzl3lnQZvlqXn3cVzotOsn+vN6pbPen 3cXCo6ZjgvXcTtaOTTxAdxtSTpCTf+vhQn3BCiJ34aIRBdn+WeAjsX/dPNQ+komY797A gCTH0m8hLkdxWvidDtu2rgBF+MbCExGJ/dGxbsxJdig3E1x724BNbxDp0UI0H9doIn7W X4vxWUhzms+6QyNIkefSHniRlnmNT2pEoNN0tcHEWtgD+e+EjIuq1dOEUHqwtSpFopyQ NH3tR7u+Ha0+7OzNEMIpuHOBFY/16+fJWmyqYV/w2QRuJZ65VKly74iz+UrJCVVAOV1U M0RA== X-Gm-Message-State: AO0yUKWwvsnPa7I8zCO4vvM3TDvu5Ci8MsfGhdaVWnmxsZ3S2qCkViEi 7MTQAQLuwghYbrmELtkM0he1YWR676z2lwPBCqWbNNbvCMqULBt0zeolLIDEzzg5E/teRMuSD1P KTARmguYAj1T9JKeZy5CL6hjpjM5RWJssSLnxH0hJ38BUkXM= X-Received: by 2002:aa7:9808:0:b0:5a8:51a7:a8d3 with SMTP id e8-20020aa79808000000b005a851a7a8d3mr1650297pfl.34.1676081615798; Fri, 10 Feb 2023 18:13:35 -0800 (PST) X-Google-Smtp-Source: AK7set+eQ6UXm5e8sWRKmbnKxbumo+35HZ/S2LqOQkpjRQKEuhHOt8Ej9U721oEgFCCC8+ZghEbmGRUjqagm1dXDYrk= X-Received: by 2002:aa7:9808:0:b0:5a8:51a7:a8d3 with SMTP id e8-20020aa79808000000b005a851a7a8d3mr1650293pfl.34.1676081615538; Fri, 10 Feb 2023 18:13:35 -0800 (PST) MIME-Version: 1.0 References: <20230210015942.3180401-1-amerey@redhat.com> <20230210015942.3180401-2-amerey@redhat.com> <875yc9zist.fsf@tromey.com> In-Reply-To: <875yc9zist.fsf@tromey.com> From: Aaron Merey Date: Fri, 10 Feb 2023 21:13:24 -0500 Message-ID: Subject: Re: [PATCH 1/2] Move implementation of perror_with_name to gdbsupport To: Tom Tromey Cc: Aaron Merey via Gdb-patches , keiths@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,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 Fri, Feb 10, 2023 at 9:39 AM Tom Tromey wrote: > > >>>>> "Aaron" == Aaron Merey via Gdb-patches writes: > > Aaron> gdbsupport/errors.h declares perror_with_name and leaves the > Aaron> implementation to the clients. > > Aaron> However gdb and gdbserver's implementations are essentially the > Aaron> same, resulting in unnecessary code duplication. > > Aaron> Fix this by implementing perror_with_name in gdbsupport. Add an > Aaron> optional parameter for specifying the errno used to generate the > Aaron> error message. > > Aaron> Also move the implementation of perror_string to gdbsupport since > Aaron> perror_with_name requires it. > > Thanks, this looks great. Thanks, pushed as commit 40dfb28b56fe55a370a Aaron