[jira] [Commented] (GROOVY-9076) Debugger Step Into doesn't work in Groovy-compiled classes

2020-12-14 Thread Eric Milles (Jira)


[ 
https://issues.apache.org/jira/browse/GROOVY-9076?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17249077#comment-17249077
 ] 

Eric Milles commented on GROOVY-9076:
-

I did a bit of testing on this issue as part of GROOVY-9373.  I noticed that 
"indy" enabled works fine and "indy" disabled (aka traditional call site 
caching) still has this issue.  As noted above, static compilation of the 
target class also steps properly in the debugger.  I am comparing these 3 
different compilation results and I think I will be able to insert a bit of new 
bytecode before the call site array load instructions to help the debugger.  
These changes would be specific to Groovy 2.5 and Groovy 3, since Groovy 4 has 
disabled the call site path.

> Debugger Step Into doesn't work in Groovy-compiled classes
> --
>
> Key: GROOVY-9076
> URL: https://issues.apache.org/jira/browse/GROOVY-9076
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 2.5.6
> Environment: $ java -version
> java version "1.8.0_211"
> Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
> Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)
>Reporter: Daniil Ovchinnikov
>Assignee: Eric Milles
>Priority: Blocker
>
> Please see https://github.com/dovchinnikov/debug-groovy-bug
> {code:title=GC.groovy}
> package foo.bar
> class GC {
> GC() {
> int i = 42
> }
> int getStuff() {
> return 70
> }
> }
> {code}
> {code:title=GMain.groovy}
> package foo.bar
> class GMain {
> static void main(String[] args) {
> new GC().stuff // set breakpoint here
> }
> } 
> {code}
> This issue is reproducible with plain raw jdb:
> {noformat}
> $ ./gradlew clean classes
> $ jdb -classpath build/classes/groovy/main:
> {noformat}
> Inside jdb prompt:
> {noformat}
> > sourcepath src/main/groovy
> > exclude 
> > java.*,sun.*,com.sun.*,groovy.*,org.codehaus.groovy.*,org.apache.groovy.*
> > stop in foo.bar.GMain.main
> > run foo.bar.GMain
> {noformat}
> Then {{step}} until the end and observe the behaviour.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (GROOVY-9076) Debugger Step Into doesn't work in Groovy-compiled classes

2019-04-19 Thread Eric Milles (JIRA)


[ 
https://issues.apache.org/jira/browse/GROOVY-9076?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16822047#comment-16822047
 ] 

Eric Milles commented on GROOVY-9076:
-

You can add a compiler config script with the following contents:
{code}
configuration.optimizationOptions.'int' = false
//configuration.optimizationOptions.indy = true
{code}

Either line will disable the "int" optimization.

> Debugger Step Into doesn't work in Groovy-compiled classes
> --
>
> Key: GROOVY-9076
> URL: https://issues.apache.org/jira/browse/GROOVY-9076
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 2.5.6
> Environment: $ java -version
> java version "1.8.0_211"
> Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
> Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)
>Reporter: Daniil Ovchinnikov
>Priority: Blocker
>
> Please see https://github.com/dovchinnikov/debug-groovy-bug
> {code:title=GC.groovy}
> package foo.bar
> class GC {
> GC() {
> int i = 42
> }
> int getStuff() {
> return 70
> }
> }
> {code}
> {code:title=GMain.groovy}
> package foo.bar
> class GMain {
> static void main(String[] args) {
> new GC().stuff // set breakpoint here
> }
> } 
> {code}
> This issue is reproducible with plain raw jdb:
> {noformat}
> $ ./gradlew clean classes
> $ jdb -classpath build/classes/groovy/main:
> {noformat}
> Inside jdb prompt:
> {noformat}
> > sourcepath src/main/groovy
> > exclude 
> > java.*,sun.*,com.sun.*,groovy.*,org.codehaus.groovy.*,org.apache.groovy.*
> > stop in foo.bar.GMain.main
> > run foo.bar.GMain
> {noformat}
> Then {{step}} until the end and observe the behaviour.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (GROOVY-9076) Debugger Step Into doesn't work in Groovy-compiled classes

2019-04-19 Thread Daniil Ovchinnikov (JIRA)


[ 
https://issues.apache.org/jira/browse/GROOVY-9076?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16822044#comment-16822044
 ] 

Daniil Ovchinnikov commented on GROOVY-9076:


[~emilles] what's the "int" optimization and how to disable it?

 

> Debugger Step Into doesn't work in Groovy-compiled classes
> --
>
> Key: GROOVY-9076
> URL: https://issues.apache.org/jira/browse/GROOVY-9076
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 2.5.6
> Environment: $ java -version
> java version "1.8.0_211"
> Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
> Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)
>Reporter: Daniil Ovchinnikov
>Priority: Blocker
>
> Please see https://github.com/dovchinnikov/debug-groovy-bug
> {code:title=GC.groovy}
> package foo.bar
> class GC {
> GC() {
> int i = 42
> }
> int getStuff() {
> return 70
> }
> }
> {code}
> {code:title=GMain.groovy}
> package foo.bar
> class GMain {
> static void main(String[] args) {
> new GC().stuff // set breakpoint here
> }
> } 
> {code}
> This issue is reproducible with plain raw jdb:
> {noformat}
> $ ./gradlew clean classes
> $ jdb -classpath build/classes/groovy/main:
> {noformat}
> Inside jdb prompt:
> {noformat}
> > sourcepath src/main/groovy
> > exclude 
> > java.*,sun.*,com.sun.*,groovy.*,org.codehaus.groovy.*,org.apache.groovy.*
> > stop in foo.bar.GMain.main
> > run foo.bar.GMain
> {noformat}
> Then {{step}} until the end and observe the behaviour.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (GROOVY-9076) Debugger Step Into doesn't work in Groovy-compiled classes

2019-04-19 Thread Daniil Ovchinnikov (JIRA)


[ 
https://issues.apache.org/jira/browse/GROOVY-9076?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16822034#comment-16822034
 ] 

Daniil Ovchinnikov commented on GROOVY-9076:


[~emilles] the issue is reproducible with class files produced by {{gradle 
clean classes}}

> Debugger Step Into doesn't work in Groovy-compiled classes
> --
>
> Key: GROOVY-9076
> URL: https://issues.apache.org/jira/browse/GROOVY-9076
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 2.5.6
> Environment: $ java -version
> java version "1.8.0_211"
> Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
> Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)
>Reporter: Daniil Ovchinnikov
>Priority: Blocker
>
> Please see https://github.com/dovchinnikov/debug-groovy-bug
> {code:title=GC.groovy}
> package foo.bar
> class GC {
> GC() {
> int i = 42
> }
> int getStuff() {
> return 70
> }
> }
> {code}
> {code:title=GMain.groovy}
> package foo.bar
> class GMain {
> static void main(String[] args) {
> new GC().stuff // set breakpoint here
> }
> } 
> {code}
> This issue is reproducible with plain raw jdb:
> {noformat}
> $ ./gradlew clean classes
> $ jdb -classpath build/classes/groovy/main:
> {noformat}
> Inside jdb prompt:
> {noformat}
> > sourcepath src/main/groovy
> > exclude 
> > java.*,sun.*,com.sun.*,groovy.*,org.codehaus.groovy.*,org.apache.groovy.*
> > stop in foo.bar.GMain.main
> > run foo.bar.GMain
> {noformat}
> Then {{step}} until the end and observe the behaviour.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (GROOVY-9076) Debugger Step Into doesn't work in Groovy-compiled classes

2019-04-19 Thread Eric Milles (JIRA)


[ 
https://issues.apache.org/jira/browse/GROOVY-9076?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16822008#comment-16822008
 ] 

Eric Milles commented on GROOVY-9076:
-

How is the code compiled?  That is, what are the groovyc settings used?  I have 
found that using the "indy" option instead of the default "fast-path" code 
generation yields simpler bytecode for the debugger to understand.  In the 
default mode, most methods have two paths through them and both paths get 
assigned the line number information of the method.  This tends to confuse the 
debugger.

> Debugger Step Into doesn't work in Groovy-compiled classes
> --
>
> Key: GROOVY-9076
> URL: https://issues.apache.org/jira/browse/GROOVY-9076
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 2.5.6
> Environment: $ java -version
> java version "1.8.0_211"
> Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
> Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)
>Reporter: Daniil Ovchinnikov
>Priority: Blocker
>
> Please see https://github.com/dovchinnikov/debug-groovy-bug
> {code:title=GC.groovy}
> package foo.bar
> class GC {
> GC() {
> int i = 42
> }
> int getStuff() {
> return 70
> }
> }
> {code}
> {code:title=GMain.groovy}
> package foo.bar
> class GMain {
> static void main(String[] args) {
> new GC().stuff // set breakpoint here
> }
> } 
> {code}
> This issue is reproducible with plain raw jdb:
> {noformat}
> $ ./gradlew clean classes
> $ jdb -classpath build/classes/groovy/main:
> {noformat}
> Inside jdb prompt:
> {noformat}
> > sourcepath src/main/groovy
> > exclude 
> > java.*,sun.*,com.sun.*,groovy.*,org.codehaus.groovy.*,org.apache.groovy.*
> > stop in foo.bar.GMain.main
> > run foo.bar.GMain
> {noformat}
> Then {{step}} until the end and observe the behaviour.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)