[PATCH v2] Replace the symbol needs evaluator with a parser
Pedro Alves
pedro@palves.net
Tue Oct 27 19:51:18 GMT 2020
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.
More information about the Gdb-patches
mailing list