This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/2] Don't lose language determined from the "main" name (fix gdb.ada/minsyms.exp)
On 11/21/2017 04:56 PM, Pedro Alves wrote:
> On 11/21/2017 04:42 PM, Pedro Alves wrote:
>> On 11/21/2017 04:23 PM, Sergio Durigan Junior wrote:
>
>>> Since this is guaranteed to be an stap probe, WDYT about moving this
>>> scoped_restore_current_language to
>>> stap-probe.c:stap_evaluate_probe_argument? This way we won't be bit by
>>> this problem in other parts that also evaluate arguments of probes.
>>>
>>> Arguably, this should be set for every probe type IMHO, but it's fine if
>>> we just do it for stap probes for now.
>>
>> That sounds like a good idea. But we could do it in
>> evaluate_probe_argument then, which handles all probe types?
>>
>> [In your probe C++ification, that translates to evaluate_probe_argument
>> becoming a non-virtual method of probe, which then calls into a
>> protected virtual method that is overridden by the actual probe
>> implementation (see e.g., the do_xxx methods of class ui_out).]
>
> Hmm, maybe what we need instead is to make expression evaluation
> never set the selected frame (and thus language as side effect)
> if it wasn't selected/set already. Like below. This fixes
> the testcase too. I'll run the full testsuite now. WDYT?
Full testsuite run complete; no regressions.
Thanks,
Pedro Alves