Commit Graph

19 Commits

Author SHA1 Message Date
Mads Ager dc34d355bc [JVM_IR] Generate line numbers and nops for init blocks.
This seems to be what JVM does and it allows you to set a
breakpoint on the init line.
2020-06-10 08:05:52 +02:00
Mads Ager f128e5222a [JVM_IR] Fix line number information for try-catch.
In particular, the current line numbers could lead to stepping
into the catch handler even when the code in the try did not
throw an exception.

This was caused by the code materializing the final value having
the catch line number. This patch delays the materialization
until the line number of the usage has been emitted.
2020-06-03 07:33:21 +02:00
Mads Ager 7d7b9262e7 [JVM] Port remaining line number tests to stepping infrastructure.
These line number tests only tested that a set of line numbers where
present in the java bytecode. Not that they would be hit in the
right order by the debugger. Moving them to stepping tests fixes that.

This exposes a couple of issues (in particular around try-catch-finally)
that should be fixed.

A number of tests are marked as failing now. Will investigate and
work on fixes next.
2020-05-29 15:07:49 +02:00
Mads Ager 9fa1614903 [JVM] Port line number tests to stepping framework.
Allow specifying JVM and JVM_IR as well as shared expectations.

Add the method name to the step.

Discard steps in synthetic methods.
2020-05-27 07:28:47 +02:00
pyos 76c34a07b2 JVM: use 1 as a synthetic line number for @InlineOnly lambdas
The source path already marks it as synthetic.
2020-05-25 20:03:56 +02:00
pyos 25e1fb8502 JVM: map synthetic line numbers through the SMAP
This is necessary so that IDEA does not ignore the line number.
2020-05-25 20:03:56 +02:00
Kristoffer Andersen 7ec4c9990a [JVM] Improve debug step behavior around lambdas.
- Add tests to clarify problematic behavior
- Avoid line numbers on return instructions of lambdas without explicit returns
2020-04-15 14:33:49 +02:00
Mads Ager 03fb49bb38 [JVM_IR] Improve debugging behavior of inline functions
Specifically, this commit improves the stepping behavior of the IR
backend around functions with defaults.

  - Improved line numbers in the default handler itself for better
    stepping when inlined.

  - Improved source information on default arguments

  - Improved test coverage of stepping behavior in old and IR backends.

Improves the stepping behaviour around inline methods with default
arguments. In particular, we now accurately step through the
evaluation of default arguments, but do _not_ spuriously show the exit
from the $default handler.
2020-04-07 16:52:45 +02:00
Mads Ager 5570a5fe74 [JVM_IR] Use iinc for incrementing Int variables.
Fix line number generation for assignments where the right-hand
side of the assignment is not on the same line.

Fix line number generation for intrinsics functions where the
function is not on the same line as the last argument.

Be careful to not break stepping behavior with the iinc
optimizations.
2020-03-27 18:17:53 +03:00
Jinseong Jeon b71b0fa32c Update stepping tests to inspect source name, instead of method info. 2020-03-17 13:39:35 +01:00
Jinseong Jeon 5dc1651a44 JVM: missed line number for return expression. 2020-03-17 13:39:35 +01:00
Yan Zhulanow f115bde682 Debugger, BE: Provide Java-like stepping for 'for' loops
- Visit '}' instead of 'for' keyword on post-condition
- Visit 'for' keyword on pre-condition
2020-02-14 17:35:17 +09:00
Steven Schäfer e261b1e2de JVM IR: Fix line numbers in callable reference classes 2019-12-23 14:03:34 +01:00
Jiaxiang Chen 0441e484a6 PSI2IR: For implicit function return, use expression's end offset as start offset of the IrReturn to generarate correct line number. 2019-11-26 17:59:28 +03:00
Jiaxiang Chen 331b085b2f JVM_IR: Fix line number for catch clause. 2019-11-26 17:59:28 +03:00
Jiaxiang Chen 3ea878b1c6 JVM_IR: Fix line number for varible initializer 2019-11-26 17:59:28 +03:00
Jiaxiang Chen 0ea407fef9 debug information test: handle vm resume correctly. 2019-11-26 14:52:58 +03:00
Jiaxiang Chen 6454cfad87 add local variable test. This test runs box() method and checks local variable types and names avaiable at every step. 2019-10-30 14:13:12 +03:00
Jiaxiang Chen 0a2812f83b Add a JVM backend debug information test, this commit is for verifying
line numbers for stepping.

Running JVM instance and read stepping events from it to verify with the
test data.
2019-10-05 10:41:11 +02:00