Summary: | Cannot inspect captured variable inside lambda when running in different thread | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Helo Spark <helospark> |
Component: | Debug | Assignee: | JDT-Debug-Inbox <jdt-debug-inbox> |
Status: | NEW --- | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | loskutov |
Version: | 4.10 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Linux | ||
See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=516278 | ||
Whiteboard: | stalebug |
Description
Helo Spark
2018-12-29 07:34:18 EST
This corresponds to the known not yet supported cases from bug 516278 comment 2, point 2: the lambda is used not in the defined method but passed to another method. In this case we can't retrieve the context from the debugger stack, because the stack doesn't have references to "main". What we have here are only arg$1, arg$2, ... variables which we need to match to the captured variables used inside lambda in order of they use. To do this we need to parse the lambda body and "count" captured variables as if we were the compiler. After that, we can lookup the captured variable by name and use its index in the captured variables list of our lambda body to find the right arg$ value. This should be doable for cases where we have sources for the current lambda, so that we can construct AST on it and somehow compute which variables are captured . This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |