From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 161qJmIN2GN3fyUAWB0awg (envelope-from ) for ; Mon, 30 Jan 2023 13:33:06 -0500 Received: by simark.ca (Postfix, from userid 112) id 840621E128; Mon, 30 Jan 2023 13:33:06 -0500 (EST) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=sWIzNjj/; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 183D11E0D3 for ; Mon, 30 Jan 2023 13:33:06 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 966633858C2F for ; Mon, 30 Jan 2023 18:33:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 966633858C2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1675103585; bh=NenKBqBpfhQlNDkbUJmnd8r01ZVCShGnWUBKcC6Tn24=; h=To:Cc:Subject:References:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=sWIzNjj/f9cokxXz/edgQT489KZjTBDyc52/3BCXxCYR+O8mVP63SkHpf3DAjWlbN eZVZl2CaF10CXXfj+ELCvG4lUaYI+XW71NwT94RoYxNBUrvp21By3RKvgZog/NFJIJ xQY73+NZK0WfcBDMbL9OA08JW+xNByhWoaH8U4ZI= Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) by sourceware.org (Postfix) with ESMTPS id 3BA0C3858D1E for ; Mon, 30 Jan 2023 18:32:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3BA0C3858D1E Received: by mail-io1-xd31.google.com with SMTP id r6so2296666ioj.5 for ; Mon, 30 Jan 2023 10:32:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=NenKBqBpfhQlNDkbUJmnd8r01ZVCShGnWUBKcC6Tn24=; b=Oq6L3DDklwb1aS7xoBMbZ6TVNHKBcKtsChieLCPcRSEf9+V+TFzhNow7Pp/RH22Mcz NyaSMYqWNCravd8+wZaVM88BIm2qiXxZAl+8xqMwF7X6ouhjdkLr649sBMhTXf7q1qr/ Im8FBs26WeJ6SGa8xmiCTHJ526wSLT4LZRTfpdJ0FNdKMCJ1mF+Z9isTwACl8czalRVQ HUu33ncuWLgmZW1wD5Iy1ZUuZrl9ajfWiNWGj7Sc0YWsXgV1S+yjDdF17Jrf/luyED9X BI4+4mM09OexIuo7H0mV9SSnScX8vLvANBI25DIp1xr6yOV30nn7N2S0TSqxJycY6uO5 ZyEQ== X-Gm-Message-State: AO0yUKVIzybnoBmBJwSx12jVX9S1hJaoqAacINj/yF604+aRbBwEdnnz TOrE/LYKS1+ptCXVhjA6zV4DfQ== X-Google-Smtp-Source: AK7set+foa6g4xeJa9uPq6TZxhhJDyHHJp8Qcz95uTn8I2KeCXnFplVKW60L32NiG0ZRwbGui/m/5A== X-Received: by 2002:a6b:b40d:0:b0:71b:3544:887 with SMTP id d13-20020a6bb40d000000b0071b35440887mr3875459iof.10.1675103564537; Mon, 30 Jan 2023 10:32:44 -0800 (PST) Received: from murgatroyd (75-166-146-144.hlrn.qwest.net. [75.166.146.144]) by smtp.gmail.com with ESMTPSA id l4-20020a6bd104000000b006f8b7d869a0sm4547086iob.1.2023.01.30.10.32.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 10:32:44 -0800 (PST) To: Pedro Alves Cc: gdb-patches@sourceware.org, Kevin Buettner Subject: Re: [PATCH] Simplify interp::exec / interp_exec - let exceptions propagate References: <20230127230545.77750-1-pedro@palves.net> X-Attribution: Tom Date: Mon, 30 Jan 2023 11:32:43 -0700 In-Reply-To: <20230127230545.77750-1-pedro@palves.net> (Pedro Alves's message of "Fri, 27 Jan 2023 23:05:45 +0000") Message-ID: <87ilgnootw.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: , From: Tom Tromey via Gdb-patches Reply-To: Tom Tromey Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" >>>>> "Pedro" == Pedro Alves writes: Pedro> This patch implements a simplication that I suggested here: Pedro> https://sourceware.org/pipermail/gdb-patches/2022-March/186320.html Pedro> Currently, the interp::exec virtual method interface is such that Pedro> subclass implementations must catch exceptions and then return them Pedro> via normal function return. ... Pedro> And, I can't see why we need to have interp_exec catch the exception Pedro> and return it via the normal return path. That's normally needed when Pedro> we need to handle propagating exceptions across C code, like across Pedro> readline or ncurses, but that's not the case here. I think this is probably a leftover from the old libgdb idea. I don't really know much about it other than what I saw in comments, but I gather the idea was to present a more ordinary C API, so return values rather than longjmp exceptions. Of course we gave up on that ages ago. Pedro> It seems to me that we can simplify things by removing some Pedro> try/catch-ing and just letting exceptions propagate normally. Agreed. Approved-By: Tom Tromey Tom