From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rock.gnat.com (rock.gnat.com [205.232.38.15]) by sourceware.org (Postfix) with ESMTP id F0F963950C6A for ; Mon, 28 Sep 2020 19:46:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org F0F963950C6A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey@adacore.com Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id CFC65117085; Mon, 28 Sep 2020 15:46:23 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at gnat.com Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id KLDVOn8c9voP; Mon, 28 Sep 2020 15:46:23 -0400 (EDT) Received: from murgatroyd (97-118-100-18.hlrn.qwest.net [97.118.100.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPSA id 7057911703B; Mon, 28 Sep 2020 15:46:23 -0400 (EDT) From: Tom Tromey To: Christian Biesinger Cc: Tom Tromey , gdb-patches Subject: Re: [PATCH v2 4/6] Remove some dead code from handle_search_memory References: <20200925194913.1744541-1-tromey@adacore.com> <20200925194913.1744541-5-tromey@adacore.com> X-Attribution: Tom Date: Mon, 28 Sep 2020 13:46:22 -0600 In-Reply-To: (Christian Biesinger's message of "Mon, 28 Sep 2020 17:13:48 +0200") Message-ID: <87imbxhegh.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Sep 2020 19:46:25 -0000 >>>>> "Christian" == Christian Biesinger writes: Christian> On Fri, Sep 25, 2020 at 9:49 PM Tom Tromey wrote: >> +++ b/gdbserver/server.cc >> @@ -1054,11 +1054,8 @@ handle_search_memory (char *own_buf, int packet_len) >> >> pattern = (gdb_byte *) malloc (packet_len); >> if (pattern == NULL) >> - { >> - error ("Unable to allocate memory to perform the search"); >> - strcpy (own_buf, "E00"); >> - return; Christian> I don't know much about gdbserver but if this code was trying to send Christian> an error back maybe that code is actually needed? 'error' is noreturn, so I removed that code since it was dead. Maybe whatever catches the exception sends an error. Tom