harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregory Shimansky (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-5322) [jdktools][jpda] When executing step into selection in testStepIntoSourceMethod EUT test single step is ignored
Date Thu, 20 Dec 2007 12:39:43 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-5322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12553659
] 

Gregory Shimansky commented on HARMONY-5322:
--------------------------------------------

It looks like the problem is in the design of how eclipse handles step-into-selection command.
When it sees that instead of the needed method execution has stepped into some other method,
it issues a command step-return. That is, run until the execution returns from the method
that it has incorrectly stepped into.

Step-return command operates with stack depth. It repeats stepping in and out of methods until
stack depth is less than when it was issued. So for the debugging application situation looks
like this:

StepIntoSelectionClass.main - stack depth 1
    VM.intern - stack depth 2, eclipse issues step-return
    ClassLoader.loadClass - stack depth 2 (again!), eclipse doesn't see that stack depth is
less than 2, so it continues with step-return
    VM.intern - stack depth 2, eclipse continues with step-return
    ClassLoader.loadClass - stack depth 2, eclipse continues with step-return
    StepIntoSelectionClass.step - CORRECT METHOD!, but stack depth is 2 again! eclipse continues
with step-return
StepIntoSelectionClass.main - stack depth 1, ok eclipse is finally satisfied since step-return
command has finally got a lower stack depth than 2, but it is too late, execution has skipped
StepIntoSelectionClass.step method and so eclipse gives a warning message when StepIntoSelectionClass.main
finishes that requested method was never called. It actually was called, but eclipse didn't
notice it.

So the bug is not in the agent. The bug is in how eclipse treats incorrectly stepped into
methods. All of the lazy resolution stuff happens on the same stack depths as the needed method,
this is now how eclipse understands a java program has to be executed.

I have no solution for the problem ATM.

> [jdktools][jpda] When executing step into selection in testStepIntoSourceMethod EUT test
single step is ignored
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5322
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5322
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: App-Oriented Bug Reports
>         Environment: Linux x86_64
>            Reporter: Gregory Shimansky
>         Attachments: StepIntoSelectionClass.java
>
>
> This is a subtask for HARMONY-5305 because this bug is not related to the bug in JIT
that makes EUT to go into infinite loop. 
> Test application is attached. Test scenario is the following:
> 1. Set breakpoint on line 22
> 2. Select method step
> 3. Press Ctrl-F5 or select Step Into Selection in context menu
> When this is done debugger should step into method step. But instead it continues program
execution until function detach is called which happens at the end of execution of function
main. The bug seems to be in JDWP agent because it ignores a single step event for method
step. This event is actually reported to it with JVMTI.
> The bug with test testStepIntoSourceMethod seems to happen because on x86_64 JET doesn't
have lazy resolution. When invokevirtual for method step is executed, it compiles the method
first. This leads to calls for VM.intern and ClassLoader.load class Java calls that are reported
by JVMTI to the agent. Only after these several java calls does JVMTI report single step for
method step itself. But when this happens this event is not received by eclipse for some reason,
single step is turned off and execution continues uninterrupted until the program ends.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message