Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: "Zaric, Zoran (Zare)" <Zoran.Zaric@amd.com>, Tom Tromey <tom@tromey.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH v2] Replace the symbol needs evaluator with a parser
Date: Tue, 27 Oct 2020 19:51:18 +0000	[thread overview]
Message-ID: <4a834852-50fc-7af6-d9c7-ec1b268b317a@palves.net> (raw)
In-Reply-To: <DM6PR12MB27629B86EB857016F4877516F81D0@DM6PR12MB2762.namprd12.prod.outlook.com>

On 10/22/20 3:58 PM, Zaric, Zoran (Zare) wrote:

>> From: Tom Tromey <tom@tromey.com>
> 
>> 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.

  reply	other threads:[~2020-10-27 19:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-07 17:26 Zoran Zaric
2020-10-21 20:35 ` Tom Tromey
2020-10-22 14:58   ` Zaric, Zoran (Zare)
2020-10-27 19:51     ` Pedro Alves [this message]
2020-11-12 20:03     ` Tom Tromey
2020-11-12 20:11 ` Tom Tromey
2020-11-12 21:17   ` Zaric, Zoran (Zare)
2020-11-12 21:29     ` Zaric, Zoran (Zare)
2020-11-30 18:18       ` Zaric, Zoran (Zare) via Gdb-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4a834852-50fc-7af6-d9c7-ec1b268b317a@palves.net \
    --to=pedro@palves.net \
    --cc=Zoran.Zaric@amd.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox