From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id NuQJEEB6mF9oTgAAWB0awg (envelope-from ) for ; Tue, 27 Oct 2020 15:51:28 -0400 Received: by simark.ca (Postfix, from userid 112) id 100CC1EFBB; Tue, 27 Oct 2020 15:51:28 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 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 9E5891E590 for ; Tue, 27 Oct 2020 15:51:26 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0A9153951809; Tue, 27 Oct 2020 19:51:26 +0000 (GMT) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by sourceware.org (Postfix) with ESMTPS id 1501E3951413 for ; Tue, 27 Oct 2020 19:51:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1501E3951413 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=alves.ped@gmail.com Received: by mail-wr1-f66.google.com with SMTP id n18so3270069wrs.5 for ; Tue, 27 Oct 2020 12:51:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=1grKDPVkpwMXUurnzFM6FTWOVpXSXA2iq3pI2qDHuMY=; b=ehJ2YTss83sOso7NGmcc4r9Hbn4Jhbx3t3flX21yaF0xea6DyT4b+OClp9WdBsv7WF BriK1RF/9P/jRidd8GPrYQnV4JufEl++MXSmXliL7e3Iy595g6LwQDXkyJ71j57MhBz5 gCqHmhOtyliP6FovrAW+5sRAvfV3wf4bYmK8L5pSZHYPeyBqGxnFKxs3F6cBwxejfs5D spVl1nnY5s8FJrffESDGhFX+PzlbUMBjCtn+6f/XSuXTmaU8kUDXUlXOXp1rcWrP7J/5 Y4hk9BnzYw8oBX9W/qIWW9QdJX8BMHIamb2EnuOVKfgCn8UGyYbTiN60qeidvz9mBFjb id4g== X-Gm-Message-State: AOAM530P/uDmgbiAjB1/IXE6Ly+VJ/CJuxXvprST9macSVAGKS54wRIM hfYNJCm9GbkIcc3Vldp6UIetGYegpzBdag== X-Google-Smtp-Source: ABdhPJwwb8yDtHU4o7BE3Fij0tUanGdWImSowYOVXDuyVuT8bALfsOpKtCY7PSd4Uv90buZSo2nmhg== X-Received: by 2002:a5d:6cae:: with SMTP id a14mr4876929wra.187.1603828280624; Tue, 27 Oct 2020 12:51:20 -0700 (PDT) Received: from ?IPv6:2001:8a0:f91e:6d00:f223:ef68:24e0:af8f? ([2001:8a0:f91e:6d00:f223:ef68:24e0:af8f]) by smtp.gmail.com with ESMTPSA id m4sm3488154wrr.47.2020.10.27.12.51.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Oct 2020 12:51:19 -0700 (PDT) Subject: Re: [PATCH v2] Replace the symbol needs evaluator with a parser To: "Zaric, Zoran (Zare)" , Tom Tromey References: <20201007172613.21868-1-Zoran.Zaric@amd.com> <87imb3gvvc.fsf@tromey.com> From: Pedro Alves Message-ID: <4a834852-50fc-7af6-d9c7-ec1b268b317a@palves.net> Date: Tue, 27 Oct 2020 19:51:18 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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: , Cc: "gdb-patches@sourceware.org" Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 10/22/20 3:58 PM, Zaric, Zoran (Zare) wrote: >> From: Tom Tromey > >> One question I have here is whether we even need this symbol-needs-frame >> stuff. What if, instead, we just had gdb throw an exception in the situation >> where a frame is needed but not available? Then we could get rid of the >> asserts and gdb would simply print an error rather than crash. >> >> Can you look to see if that is feasible? The main advantage I see here is that >> this approach would avoid the problem we sometimes have of updating one >> DWARF expression-decoder and then forgetting to update the others... > > I've spoken with Pedro Alves and Simon Marchi about this and the difficulty > here is that both "python" and "scheme" interfaces expose this functionality > to the user. Yup, I had the same question & suggestion Tom had when I first heard about the issue Zoran was dealing with. I think that indeed it should be possible to remove the symbol-needs-frame stuff and let the regular evaluator throw an error instead. I was looking forward to that approach, until Zoran found out about those Python and Scheme interfaces... I don't know whether we can just remove those APIs, or reimplement those python/scheme entry points on top of the full expression evaluator. The solution Zoran came up seemed like a nice compromise. I've seen Zoran's follow up patches, and it's going to be a lot of churn, but I think the end result overall is nicer than what we have now. I wouldn't mind going ahead with this "needs" replacement for now, and seeing about redoing it on top of his follow up changes. At least, this fixes a bug already, and adds a testcase that we use later on to ensure whatever new design will still be as good.