Bug 578145: Evaluations for lambda variables are not working in nested lambda

When the focus frame is a lambda frame, the evaluation
engine will explicitly extract the visible variables from
the target frame.

Currently, it simply looks for the target frame and the
following two frames below and adds their variables to the
visible set. This doesn't work for cases like chained calls
and nested lambda.

An improved approach is to look for more frames in the
same debug file which encloses the target frame, and
append the variables of those enclosing frames to the
visible set as well. This can deal with nested lambda better.

Signed-off-by: Jinbo Wang <jinbwan@microsoft.com>
Change-Id: I57ab4fb2d0281951a693d05c8800f29d4584393f
Reviewed-on: https://git.eclipse.org/r/c/jdt/eclipse.jdt.debug/+/191713
Tested-by: JDT Bot <jdt-bot@eclipse.org>
Reviewed-by: Gayan Perera <gayanper@gmail.com>
9 files changed