[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: more on exceptions; new handler
From: |
Paul Kienzle |
Subject: |
Re: more on exceptions; new handler |
Date: |
Fri, 15 Nov 2002 10:50:49 -0500 |
User-agent: |
Mutt/1.2.5.1i |
On Fri, Nov 15, 2002 at 09:23:12AM -0600, John W. Eaton wrote:
> | This leads to another question, which is whether or not it is feasible
> | to implement evalin, which allows a function to evaluate a variable in
> | the caller's environment. Not that I particularly need this feature.
>
> Yes, I think we can implement evalin. I think that was already
> possible, even without using C++ exception handling?
I didn't see a way of retrieving the symbol table of the caller. It is
in the unwind stack as defined in ov-usr-fcn.cc:
unwind_protect_ptr (curr_sym_tab);
but unless I want to walk the unwind stack looking for it, the value is
unavailable:
curr_sym_tab = sym_tab;
evalin("base") is possible since that is just top_level_sym_tab, but
not evalin("caller").
- Paul